mirror of
https://github.com/zero-peak/ZeroOmega.git
synced 2025-01-22 06:58:14 -05:00
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:
parent
07c950c3f9
commit
785cb04196
@ -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
|
||||
|
@ -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] = {}
|
||||
|
Loading…
Reference in New Issue
Block a user