Skip to content

Commit af1ca7a

Browse files
committed
Added/applied disable-online-services.diff, disable-telemetry.diff, base-path.diff
1 parent ac92679 commit af1ca7a

File tree

19 files changed

+421
-18
lines changed

19 files changed

+421
-18
lines changed

patched-vscode/src/vs/base/common/network.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@ class RemoteAuthoritiesImpl {
168168
return URI.from({
169169
scheme: platform.isWeb ? this._preferredWebSchema : Schemas.vscodeRemoteResource,
170170
authority: `${host}:${port}`,
171-
path: this._remoteResourcesPath,
171+
path: platform.isWeb
172+
? (window.location.pathname + "/" + this._remoteResourcesPath).replace(/\/\/+/g, "/")
173+
: this._remoteResourcesPath,
172174
query
173175
});
174176
}

patched-vscode/src/vs/base/common/product.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export type ExtensionVirtualWorkspaceSupport = {
5555
};
5656

5757
export interface IProductConfiguration {
58+
readonly rootEndpoint?: string
5859
readonly version: string;
5960
readonly date?: string;
6061
readonly quality?: string;

patched-vscode/src/vs/code/browser/workbench/workbench-dev.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<script src="{{WORKBENCH_WEB_BASE_URL}}/out/vs/loader.js"></script>
3939
<script src="{{WORKBENCH_WEB_BASE_URL}}/out/vs/webPackagePaths.js"></script>
4040
<script>
41-
const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location.origin).toString();
41+
const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location).toString();
4242
Object.keys(self.webPackagePaths).map(function (key, index) {
4343
self.webPackagePaths[key] = `${baseUrl}/remote/web/node_modules/${key}/${self.webPackagePaths[key]}`;
4444
});

patched-vscode/src/vs/code/browser/workbench/workbench.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<script src="{{WORKBENCH_WEB_BASE_URL}}/out/vs/loader.js"></script>
3737
<script src="{{WORKBENCH_WEB_BASE_URL}}/out/vs/webPackagePaths.js"></script>
3838
<script>
39-
const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location.origin).toString();
39+
const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location).toString();
4040
Object.keys(self.webPackagePaths).map(function (key, index) {
4141
self.webPackagePaths[key] = `${baseUrl}/node_modules/${key}/${self.webPackagePaths[key]}`;
4242
});

patched-vscode/src/vs/code/browser/workbench/workbench.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,8 @@ class LocalStorageURLCallbackProvider extends Disposable implements IURLCallback
304304
this.startListening();
305305
}
306306

307-
return URI.parse(window.location.href).with({ path: this._callbackRoute, query: queryParams.join('&') });
307+
const path = (window.location.pathname + "/" + this._callbackRoute).replace(/\/\/+/g, "/");
308+
return URI.parse(window.location.href).with({ path: path, query: queryParams.join('&') });
308309
}
309310

310311
private startListening(): void {

patched-vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { getServiceMachineId } from 'vs/platform/externalServices/common/service
1616
import { IStorageService } from 'vs/platform/storage/common/storage';
1717
import { TelemetryLevel } from 'vs/platform/telemetry/common/telemetry';
1818
import { getTelemetryLevel, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils';
19-
import { RemoteAuthorities } from 'vs/base/common/network';
2019
import { getRemoteServerRootPath } from 'vs/platform/remote/common/remoteHosts';
2120
import { TargetPlatform } from 'vs/platform/extensions/common/extensions';
2221

@@ -102,7 +101,7 @@ export abstract class AbstractExtensionResourceLoaderService implements IExtensi
102101
: version,
103102
path: 'extension'
104103
}));
105-
return this._isWebExtensionResourceEndPoint(uri) ? uri.with({ scheme: RemoteAuthorities.getPreferredWebSchema() }) : uri;
104+
return this._isWebExtensionResourceEndPoint(uri) ? URI.joinPath(URI.parse(window.location.href), uri.path) : uri;
106105
}
107106
return undefined;
108107
}

patched-vscode/src/vs/platform/remote/browser/browserSocketFactory.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ export class BrowserSocketFactory implements ISocketFactory<RemoteConnectionType
280280
connect({ host, port }: WebSocketRemoteConnection, path: string, query: string, debugLabel: string): Promise<ISocket> {
281281
return new Promise<ISocket>((resolve, reject) => {
282282
const webSocketSchema = (/^https:/.test(window.location.href) ? 'wss' : 'ws');
283+
path = (window.location.pathname + "/" + path).replace(/\/\/+/g, "/")
283284
const socket = this._webSocketFactory.create(`${webSocketSchema}://${(/:/.test(host) && !/\[/.test(host)) ? `[${host}]` : host}:${port}${path}?${query}&skipWebSocketFrames=false`, debugLabel);
284285
const errorListener = socket.onError(reject);
285286
socket.onOpen(() => {

patched-vscode/src/vs/platform/telemetry/common/1dsAppender.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ export interface IAppInsightsCore {
1818
unload(isAsync: boolean, unloadComplete: (unloadState: ITelemetryUnloadState) => void): void;
1919
}
2020

21-
const endpointUrl = 'https://mobile.events.data.microsoft.com/OneCollector/1.0';
22-
const endpointHealthUrl = 'https://mobile.events.data.microsoft.com/ping';
21+
const endpointUrl = 'https://0.0.0.0/OneCollector/1.0';
22+
const endpointHealthUrl = 'https://0.0.0.0/ping';
2323

2424
async function getClient(instrumentationKey: string, addInternalFlag?: boolean, xhrOverride?: IXHROverride): Promise<IAppInsightsCore> {
2525
const oneDs = await importAMDNodeModule<typeof import('@microsoft/1ds-core-js')>('@microsoft/1ds-core-js', 'dist/ms.core.js');

patched-vscode/src/vs/platform/telemetry/common/telemetryService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,15 +204,15 @@ Registry.as<IConfigurationRegistry>(Extensions.Configuration).registerConfigurat
204204
'properties': {
205205
[TELEMETRY_SETTING_ID]: {
206206
'type': 'string',
207-
'enum': [TelemetryConfiguration.ON, TelemetryConfiguration.ERROR, TelemetryConfiguration.CRASH, TelemetryConfiguration.OFF],
207+
'enum': [TelemetryConfiguration.OFF],
208208
'enumDescriptions': [
209209
localize('telemetry.telemetryLevel.default', "Sends usage data, errors, and crash reports."),
210210
localize('telemetry.telemetryLevel.error', "Sends general error telemetry and crash reports."),
211211
localize('telemetry.telemetryLevel.crash', "Sends OS level crash reports."),
212212
localize('telemetry.telemetryLevel.off', "Disables all product telemetry.")
213213
],
214214
'markdownDescription': getTelemetryLevelSettingDescription(),
215-
'default': TelemetryConfiguration.ON,
215+
'default': TelemetryConfiguration.OFF,
216216
'restricted': true,
217217
'scope': ConfigurationScope.APPLICATION,
218218
'tags': ['usesOnlineServices', 'telemetry']

patched-vscode/src/vs/platform/update/common/update.config.contribution.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ configurationRegistry.registerConfiguration({
1818
'update.mode': {
1919
type: 'string',
2020
enum: ['none', 'manual', 'start', 'default'],
21-
default: 'default',
21+
default: 'none',
2222
scope: ConfigurationScope.APPLICATION,
2323
description: localize('updateMode', "Configure whether you receive automatic updates. Requires a restart after change. The updates are fetched from a Microsoft online service."),
2424
tags: ['usesOnlineServices'],
@@ -50,7 +50,7 @@ configurationRegistry.registerConfiguration({
5050
},
5151
'update.showReleaseNotes': {
5252
type: 'boolean',
53-
default: true,
53+
default: false,
5454
scope: ConfigurationScope.APPLICATION,
5555
description: localize('showReleaseNotes', "Show Release Notes after an update. The Release Notes are fetched from a Microsoft online service."),
5656
tags: ['usesOnlineServices']

0 commit comments

Comments
 (0)