diff options
| author | Jonathan <jonathan@mullvad.net> | 2024-01-03 14:39:12 +0100 |
|---|---|---|
| committer | Jonathan <jonathan@mullvad.net> | 2024-01-03 14:39:12 +0100 |
| commit | 711d4e439866ab12e03d33d5efae3c2355c0c229 (patch) | |
| tree | 80d3a23c1a96bd3d80e05ac66b530e39c252d48a /gui/src/shared | |
| parent | c510df96772b1e4ab7998e739ced42806c78e931 (diff) | |
| parent | 4fdc34acbba60d5092e45ce3e513d30ec996c317 (diff) | |
| download | mullvadvpn-711d4e439866ab12e03d33d5efae3c2355c0c229.tar.xz mullvadvpn-711d4e439866ab12e03d33d5efae3c2355c0c229.zip | |
Merge branch 'implement-custom-openvpn-socks5-bridge-client-in-daemon-des-430'
Diffstat (limited to 'gui/src/shared')
| -rw-r--r-- | gui/src/shared/bridge-settings-builder.ts | 2 | ||||
| -rw-r--r-- | gui/src/shared/daemon-rpc-types.ts | 24 |
2 files changed, 20 insertions, 6 deletions
diff --git a/gui/src/shared/bridge-settings-builder.ts b/gui/src/shared/bridge-settings-builder.ts index 858bea055d..2ee5469707 100644 --- a/gui/src/shared/bridge-settings-builder.ts +++ b/gui/src/shared/bridge-settings-builder.ts @@ -7,11 +7,13 @@ export default class BridgeSettingsBuilder { public build(): BridgeSettings { if (this.payload.location) { return { + type: 'normal', normal: { location: this.payload.location, providers: this.payload.providers ?? [], ownership: this.payload.ownership ?? Ownership.any, }, + custom: undefined, }; } else { throw new Error('Unsupported configuration'); diff --git a/gui/src/shared/daemon-rpc-types.ts b/gui/src/shared/daemon-rpc-types.ts index e83f9e5afc..48a4110e13 100644 --- a/gui/src/shared/daemon-rpc-types.ts +++ b/gui/src/shared/daemon-rpc-types.ts @@ -345,15 +345,20 @@ export interface IDnsOptions { }; } -export type ProxySettings = ILocalProxySettings | IRemoteProxySettings | IShadowsocksProxySettings; +export type ProxySettings = + | { local: ILocalProxySettings } + | { remote: IRemoteProxySettings } + | { shadowsocks: IShadowsocksProxySettings }; export interface ILocalProxySettings { - port: number; - peer: string; + localPort: number; + remoteIp: string; + remotePort: number; } export interface IRemoteProxySettings { - address: string; + ip: string; + port: number; auth?: IRemoteProxyAuth; } @@ -363,7 +368,8 @@ export interface IRemoteProxyAuth { } export interface IShadowsocksProxySettings { - peer: string; + ip: string; + port: number; password: string; cipher: string; } @@ -451,7 +457,13 @@ export interface IBridgeConstraints { ownership: Ownership; } -export type BridgeSettings = { normal: IBridgeConstraints } | { custom: ProxySettings }; +export type BridgeType = 'normal' | 'custom'; + +export interface BridgeSettings { + type: BridgeType; + normal: IBridgeConstraints; + custom?: ProxySettings; +} export interface ISocketAddress { host: string; |
