Created
June 24, 2015 20:36
-
-
Save snaggled/07e6fbc22c5aa8b3ee11 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSString* proxyHost = @"localhost"; | |
NSNumber* proxyPort = [NSNumber numberWithInt: 8888]; | |
// Create an NSURLSessionConfiguration that uses the proxy | |
NSDictionary *proxyDict = @{ | |
@"HTTPEnable" : [NSNumber numberWithInt:1], | |
(NSString *)kCFStreamPropertyHTTPProxyHost : proxyHost, | |
(NSString *)kCFStreamPropertyHTTPProxyPort : proxyPort, | |
@"HTTPSEnable" : [NSNumber numberWithInt:1], | |
(NSString *)kCFStreamPropertyHTTPSProxyHost : proxyHost, | |
(NSString *)kCFStreamPropertyHTTPSProxyPort : proxyPort, | |
}; | |
configuration.connectionProxyDictionary = proxyDict; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment