mirror of
https://github.com/qinyuhang/ShadowsocksX-NG-R.git
synced 2026-10-24 09:16:45 +00:00
fix up firewall permission request
This commit is contained in:
@@ -200,7 +200,13 @@ GCDWebServer *webServer = nil;
|
||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||
NSString * address = [defaults stringForKey:@"PacServer.ListenAddress"];
|
||||
int port = (short)[defaults integerForKey:@"PacServer.ListenPort"];
|
||||
[webServer startWithPort:port bonjourName:@"webserver"];
|
||||
|
||||
NSMutableDictionary* options = [NSMutableDictionary dictionary];
|
||||
[options setObject:[NSNumber numberWithInteger:port] forKey:GCDWebServerOption_Port];
|
||||
[options setObject:@YES forKey:@"BindToLocalhost"];
|
||||
|
||||
[webServer startWithOptions:options error:NULL];
|
||||
// [webServer startWithPort:port bonjourName:@"webserver"];
|
||||
return [NSString stringWithFormat:@"%@%@:%d%@",@"http://",address,port,routerPath];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user