Fixes bug in proxy_conf_helper.
This commit is contained in:
@ -9,6 +9,6 @@
|
|||||||
#ifndef proxy_conf_helper_version_h
|
#ifndef proxy_conf_helper_version_h
|
||||||
#define proxy_conf_helper_version_h
|
#define proxy_conf_helper_version_h
|
||||||
|
|
||||||
#define kProxyConfHelperVersion @"1.8.0"
|
#define kProxyConfHelperVersion @"1.8.2"
|
||||||
|
|
||||||
#endif /* proxy_conf_helper_version_h */
|
#endif /* proxy_conf_helper_version_h */
|
||||||
|
@ -188,7 +188,7 @@ int main(int argc, const char * argv[])
|
|||||||
SCPreferencesPathSetValue(prefRef, (__bridge CFStringRef)prefPath
|
SCPreferencesPathSetValue(prefRef, (__bridge CFStringRef)prefPath
|
||||||
, (__bridge CFDictionaryRef)proxies);
|
, (__bridge CFDictionaryRef)proxies);
|
||||||
} else if ([mode isEqualToString:@"off"]) {
|
} else if ([mode isEqualToString:@"off"]) {
|
||||||
if (pacURL != nil && portString != nil) {
|
if (pacURL != nil && portString != nil && socks5ListenAddress != nil) {
|
||||||
// 取原来的配置,判断是否为shadowsocksX-NG设置的
|
// 取原来的配置,判断是否为shadowsocksX-NG设置的
|
||||||
NSDictionary* oldProxies
|
NSDictionary* oldProxies
|
||||||
= (__bridge NSDictionary*)SCPreferencesPathGetValue(prefRef
|
= (__bridge NSDictionary*)SCPreferencesPathGetValue(prefRef
|
||||||
@ -196,7 +196,7 @@ int main(int argc, const char * argv[])
|
|||||||
|
|
||||||
if (([oldProxies[(NSString *)kCFNetworkProxiesProxyAutoConfigURLString] isEqualToString:pacURL]
|
if (([oldProxies[(NSString *)kCFNetworkProxiesProxyAutoConfigURLString] isEqualToString:pacURL]
|
||||||
&&[oldProxies[(NSString *)kCFNetworkProxiesProxyAutoConfigEnable] isEqual:[NSNumber numberWithInt:1]])
|
&&[oldProxies[(NSString *)kCFNetworkProxiesProxyAutoConfigEnable] isEqual:[NSNumber numberWithInt:1]])
|
||||||
||([oldProxies[(NSString*)kCFNetworkProxiesSOCKSProxy] isEqualToString:@"127.0.0.1"]
|
||([oldProxies[(NSString*)kCFNetworkProxiesSOCKSProxy] isEqualToString:socks5ListenAddress]
|
||||||
&&[oldProxies[(NSString*)kCFNetworkProxiesSOCKSPort] isEqualTo:[NSNumber numberWithInteger:port]]
|
&&[oldProxies[(NSString*)kCFNetworkProxiesSOCKSPort] isEqualTo:[NSNumber numberWithInteger:port]]
|
||||||
&&[oldProxies[(NSString*)kCFNetworkProxiesSOCKSEnable] isEqual:[NSNumber numberWithInt:1]])
|
&&[oldProxies[(NSString*)kCFNetworkProxiesSOCKSEnable] isEqual:[NSNumber numberWithInt:1]])
|
||||||
) {
|
) {
|
||||||
|
Reference in New Issue
Block a user