Replace socks with socks5 in proxy protocol (#1776)

The net/http package in arduino-cli supports socks5 as scheme rather than socks.

Co-authored-by: per1234 <accounts@perglass.com>
This commit is contained in:
Self Not Found 2022-12-21 21:34:09 +08:00 committed by GitHub
parent 644e6079b3
commit 3f05396222
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -406,7 +406,7 @@ export class SettingsComponent extends React.Component<
} }
onChange={this.socksProtocolDidChange} onChange={this.socksProtocolDidChange}
/> />
SOCKS SOCKS5
</label> </label>
</form> </form>
<div className="flex-line proxy-settings"> <div className="flex-line proxy-settings">
@ -682,7 +682,7 @@ export class SettingsComponent extends React.Component<
): void => { ): void => {
if (this.state.network !== 'none') { if (this.state.network !== 'none') {
const network = this.cloneProxySettings; const network = this.cloneProxySettings;
network.protocol = event.target.checked ? 'http' : 'socks'; network.protocol = event.target.checked ? 'http' : 'socks5';
this.setState({ network }); this.setState({ network });
} }
}; };
@ -692,7 +692,7 @@ export class SettingsComponent extends React.Component<
): void => { ): void => {
if (this.state.network !== 'none') { if (this.state.network !== 'none') {
const network = this.cloneProxySettings; const network = this.cloneProxySettings;
network.protocol = event.target.checked ? 'socks' : 'http'; network.protocol = event.target.checked ? 'socks5' : 'http';
this.setState({ network }); this.setState({ network });
} }
}; };