You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+68-57Lines changed: 68 additions & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,120 +2,131 @@
2
2
3
3
This enables Visual Studio Code's web presence to be mirrored for seamless use in an offline environment (e.g. air-gapped), or to run a private gallery.
4
4
5
-
In effect, content is served through expected interfaces, without changing any of the publicly available binaries. Typically, you would sync the content needing to be availabe on the non-Internet connected system and point the DNS to the mirror service. __No binaries nor extensions are modified.__
6
-
5
+
In effect, content is served through expected interfaces, without changing any of the publicly available binaries. Typically, you would sync the content needing to be availabe on the non-Internet connected system and point the DNS to the mirror service. **No binaries nor extensions are modified.**
7
6
8
7
## Features
9
8
10
9
On the Internet connected system , **vscsync** will:
11
-
* Mirror the VS Code installer/update binaries across platforms (Windows|Linux|Darwin) and builds (stable|insider);
12
-
* Mirror recommended/typical extensions from the marketplace;
13
-
* Mirror the malicious extension list;
14
-
* Mirror a list of manually specified extensions (artifacts/specified.json); and
15
-
* Optionally, mirror all extensions (--syncall, rather than the default of --sync).
10
+
11
+
- Mirror the VS Code installer/update binaries across platforms (Windows|Linux|Darwin) and builds (stable|insider);
12
+
- Mirror recommended/typical extensions from the marketplace;
13
+
- Mirror the malicious extension list;
14
+
- Mirror a list of manually specified extensions (artifacts/specified.json); and
15
+
- Optionally, mirror all extensions (--syncall, rather than the default of --sync).
16
16
17
17
On the non-Internet connected system, **vscgallery**:
18
-
* Implements the updater interface to enable offline updating;
19
-
* Implements the extension API to enable offline extension use;
20
-
* Implements the malicious extension list;
21
-
* Implements initial support for multiple versions;
22
-
* Supports extension search (name, author and short description) and sorting;
23
-
* Supports custom/private extensions (follow the structure of a mirrored extension); and
24
-
* Supports Remote Development.
18
+
19
+
- Implements the updater interface to enable offline updating;
20
+
- Implements the extension API to enable offline extension use;
21
+
- Implements the malicious extension list;
22
+
- Implements initial support for multiple versions;
23
+
- Supports extension search (name, author and short description) and sorting;
24
+
- Supports custom/private extensions (follow the structure of a mirrored extension); and
25
+
- Supports Remote Development.
25
26
26
27
Possible TODO List:
27
-
* vscgallery - Support paging, if it's really needed (who searches 1000s of extensions anyway).
28
-
* Investigate some form of dependency handling (if possible).
29
-
* Add test cases.
28
+
29
+
- vscgallery - Support paging, if it's really needed (who searches 1000s of extensions anyway).
30
+
- Investigate some form of dependency handling (if possible).
31
+
- Add test cases.
30
32
31
33
## Requirements
32
-
* Docker (ideally with docker-compose for simplicity)
34
+
35
+
- Docker (ideally with docker-compose for simplicity)
33
36
34
37
## Getting Started - Full Offline Use - Using Docker Containers
35
38
36
39
There are two components, **vscsync** which mirrors the content on an Internet connected system, and **vscgallery** which provides the necessary APIs and endpoints necessary to support VS Code's use. While it is designed for offline environments, it is possible, with some DNS trickery, that this could be operated as a "corporate" VS Code gallery.
37
40
38
41
On the Internet connected system:
39
42
40
-
1. Acquire/mirror the Docker containers (vscsync/vscgallery).
43
+
1. Acquire/mirror the Docker containers (vscsync/vscgallery).
41
44
42
-
`docker-compose pull`
45
+
`docker-compose pull`
43
46
44
47
2. Setup and run the vscsync service on the Internet connected system.
45
-
* Ensuring the artifact directory is accessible to whatever transfer mechanism you will use and vscsync.
46
-
* Run vscsync service and ensure the artifacts are generated.
47
-
* Wait for the sync to complete. You should see 'Complete' and that it is sleeping when the artifacts have finished downloading.
48
48
49
-
`docker-compose up vscsync`
49
+
- Ensuring the artifact directory is accessible to whatever transfer mechanism you will use and vscsync.
50
+
- Run vscsync service and ensure the artifacts are generated.
51
+
- Wait for the sync to complete. You should see 'Complete' and that it is sleeping when the artifacts have finished downloading.
50
52
51
-
4. Copy the artifacts to the non-Internet connected system.
53
+
`docker-compose up vscsync`
54
+
55
+
3. Copy the artifacts to the non-Internet connected system.
52
56
53
57
On the non-Internet connected system:
54
58
55
59
1. On the non-Internet connected system, ensure the following DNS addresses are pointed toward the vscgallery service.
56
-
* update.code.visualstudio.com
57
-
* az764295.vo.msecnd.net
58
-
* marketplace.visualstudio.com
59
60
60
-
This may be achieved using a corporate DNS server, or by modifying a client's host file.
61
+
- update.code.visualstudio.com
62
+
- az764295.vo.msecnd.net
63
+
- marketplace.visualstudio.com
64
+
65
+
This may be achieved using a corporate DNS server, or by modifying a client's host file.
61
66
62
-
2. Sort out SSL/TLS within your environment to support offline use.
63
-
* Either create a certificate which is signed for the above domains, and is trusted by the clients; or
64
-
* Deploy the bundled root and intermediate certificate authority (vscoffline/vscgallery/ssl/ca.crt and ia.crt), with the obvious security tradeoff.
67
+
2. Sort out SSL/TLS within your environment to support offline use.
65
68
66
-
**Windows 10**: Import the certificates into the machine's trusted root certificate authority (Start > "Manage Computer Certificates").
69
+
- Either create a certificate which is signed for the above domains, and is trusted by the clients; or
70
+
- Deploy the bundled root and intermediate certificate authority (vscoffline/vscgallery/ssl/ca.crt and ia.crt), with the obvious security tradeoff.
67
71
68
-
**Darwin**: Import the certificates into the machine's trusted root certificate authority.
72
+
**Windows 10**: Import the certificates into the machine's trusted root certificate authority (Start > "Manage Computer Certificates").
69
73
70
-
**Ubuntu**: Easiest method seems to be Open Chrome, navigate to
71
-
chrome://settings/certificates, select authorities and add the certificates. Firefox on Ubuntu maintains its own certificate store. Either add the root CA, or switch Firefox to use OS provided certificates (see: https://github.com/LOLINTERNETZ/vscodeoffline/issues/43#issuecomment-1545801875).
74
+
**Darwin**: Import the certificates into the machine's trusted root certificate authority.
75
+
76
+
**Ubuntu**: Easiest method seems to be Open Chrome, navigate to
77
+
chrome://settings/certificates, select authorities and add the certificates. Firefox on Ubuntu maintains its own certificate store. Either add the root CA, or switch Firefox to use OS provided certificates (see: <https://github.com/LOLINTERNETZ/vscodeoffline/issues/43#issuecomment-1545801875>).
72
78
73
79
3. Run the vscgallery service, ensuring the artifacts are accessible to the service. It needs to listen on port 443.
74
80
75
-
`docker-compose up vscgallery`
81
+
`docker-compose up vscgallery`
76
82
77
-
4. Using Chrome/Firefox navigate to https://update.code.visualstudio.com. You should not see any certificate warnings, if you do it's unlikely to work in VS Code.
83
+
4. Using Chrome/Firefox navigate to <https://update.code.visualstudio.com>. You should not see any certificate warnings, if you do it's unlikely to work in VS Code.
78
84
79
85
5. Open VS Code, hopefully you can magically install extensions and update the install. The Help > Developer Tools > Network should tell you what is going on.
80
86
81
87
Note: Chrome, rather than other browsers, will likely give you a better indication as to what is going on as VS Code and Chrome share the same certificate trust.
82
88
83
-
84
89
## Getting Started - Standalone Install (Testing or Private Gallery) - Using Docker Containers
85
-
This guide will setup the vscsync and vscgallery service on the same Docker host.
90
+
91
+
This guide will setup the vscsync and vscgallery service on the same Docker host.
86
92
87
93
1. Grab the docker-compose.yml file.
88
-
* Ensure the docker-compose DNS configuration will override what is configured in step 2 (e.g. vscsync can access the Internet, whereas local hosts are directed toward the vscgallery service).
89
-
* Ensure both containers will mount the same artifact folder.
94
+
95
+
- Ensure the docker-compose DNS configuration will override what is configured in step 2 (e.g. vscsync can access the Internet, whereas local hosts are directed toward the vscgallery service).
96
+
- Ensure both containers will mount the same artifact folder.
90
97
91
98
2. Point the DNS addresses to the vscgallery service.
92
-
* update.code.visualstudio.com
93
-
* az764295.vo.msecnd.net
94
-
* marketplace.visualstudio.com
95
99
96
-
This may be achieved using a corporate DNS server, or by modifying a client's host file.
100
+
- update.code.visualstudio.com
101
+
-~~az764295.vo.msecnd.net~~ (Removed 2025/08/22)
102
+
- marketplace.visualstudio.com
103
+
- main.vscode-cdn.net (Added 2025/08/22)
104
+
105
+
This may be achieved using a corporate DNS server, or by modifying a client's host file.
97
106
98
107
3. Deploy SSL/TLS certificates as necessary, as described above.
99
108
100
109
4. Run the services
101
110
102
-
`docker-compose up`
111
+
`docker-compose up`
103
112
104
113
5. Using Chrome navigate to https://update.code.visualstudio.com. You should not see any certificate warnings, if you do it's unlikely to work in VS Code.
105
114
106
115
6. Open VS Code, hopefully you can magically install extensions and update the install. The Help > Developer Tools > Network should tell you what is going on.
107
116
108
-
109
117
## Sync Arguments (vscsync)
110
-
These arguments can be passed as command line arguments to sync.py (e.g. --varA or --varB), or passed via the Docker environment variable `SYNCARGS`.
111
118
112
-
### Typical Sync Args:
113
-
*`--sync` To fetch stable binaries and popular extensions.
114
-
*`--syncall` To fetch everything (stable binaries, insider binaries and all extensions).
115
-
*`--sync --check-insider` To fetch stable binaries, insider binaries and popular extensions.
119
+
These arguments can be passed as command line arguments to sync.py (e.g. --varA or --varB), or passed via the Docker environment variable `SYNCARGS`.
116
120
117
-
### Possible Args:
118
-
```
121
+
### Typical Sync Args
122
+
123
+
-`--sync` To fetch stable binaries and popular extensions.
124
+
-`--syncall` To fetch everything (stable binaries, insider binaries and all extensions).
125
+
-`--sync --check-insider` To fetch stable binaries, insider binaries and popular extensions.
0 commit comments