1. cannot connect to SOCKS proxy with login/password auth #83

2. Opening the settings of a Socks5 Proxy with saved credentials deletes those credentials #67
This commit is contained in:
proxy.zeroomega 2025-01-14 13:42:34 +08:00
parent 07c950c3f9
commit 785cb04196
2 changed files with 4 additions and 5 deletions

View File

@ -48,6 +48,7 @@ class FirefoxProxyImpl extends ProxyImpl
blobUrl = URL.createObjectURL(blob)
browser.proxy.settings.set({
value: {
proxyDNS: true,
proxyType: 'autoConfig',
autoConfigUrl: blobUrl
}
@ -58,7 +59,7 @@ class FirefoxProxyImpl extends ProxyImpl
@_optionsReadyCallback = null
return @setProxyAuth(profile, options)
onRequest: (requestDetails) ->
return undefined if browser.extension.isAllowedIncognitoAccess()
#return undefined if browser.extension.isAllowedIncognitoAccess()
# TODO
#return undefined
# The browser only recognizes native promises return values, not Bluebird.
@ -71,7 +72,7 @@ class FirefoxProxyImpl extends ProxyImpl
switch profile.profileType
when 'DirectProfile'
return {type: 'direct'}
when 'SystemProfile'
when 'SystemProfile', 'PacProfile'
# Returning undefined means using the default proxy from previous.
# https://hg.mozilla.org/mozilla-central/rev/9f0ee2f582a2#l1.337
return undefined

View File

@ -38,7 +38,7 @@ angular.module('omega').controller 'FixedProfileCtrl', ($scope, $modal,
$scope.proxyEditors = {}
socks5AuthSupported = (browser?.proxy?.register?)
socks5AuthSupported = (browser?.proxy?.onRequest?)
$scope.authSupported = {
"http": true,
"https": true,
@ -71,8 +71,6 @@ angular.module('omega').controller 'FixedProfileCtrl', ($scope, $modal,
return unless proxyEditors
for scheme in $scope.urlSchemes
proxy = proxyEditors[scheme]
if $scope.profile.auth and not $scope.authSupported[proxy.scheme]
delete $scope.profile.auth[proxyProperties[scheme]]
if not proxy.scheme
if not scheme
proxyEditors[scheme] = {}