Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

custom home page setting. refactor settings storage.

  • Loading branch information...
commit 497be74840df8e5c3ae36130ab79c0f361f9dabb 1 parent be2f349
@mtigas mtigas authored
View
7 OnionBrowser/ConnectionKit/CKHTTPConnection.m
@@ -347,7 +347,9 @@ - (CFHTTPMessageRef)makeHTTPMessage
//[NSMakeCollectable(result) autorelease];
AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
- Byte spoofUserAgent = appDelegate.spoofUserAgent;
+ NSMutableDictionary *settings = appDelegate.getSettings;
+
+ Byte spoofUserAgent = [[settings valueForKey:@"uaspoof"] integerValue];
NSDictionary *HTTPHeaderFields = [self allHTTPHeaderFields];
@@ -375,7 +377,8 @@ - (CFHTTPMessageRef)makeHTTPMessage
(__bridge CFStringRef)[HTTPHeaderFields objectForKey:aHTTPHeaderField]);
}
/* Do not track (DNT) header */
- Byte dntHeader = appDelegate.dntHeader;
+
+ Byte dntHeader = [[settings valueForKey:@"dnt"] integerValue];
if (dntHeader != DNT_HEADER_UNSET) {
// DNT_HEADER_CANTRACK is 0 and DNT_HEADER_NOTRACK is 1,
// so we can pass that value in as the "DNT: X" value
View
25 OnionBrowser/OnionBrowser/AppDelegate.h
@@ -9,14 +9,21 @@
#import "WebViewController.h"
#import "TorController.h"
-#define DNT_HEADER_UNSET 0
-#define DNT_HEADER_CANTRACK 1
-#define DNT_HEADER_NOTRACK 2
+#define COOKIES_ALLOW_ALL 0
+#define COOKIES_BLOCK_THIRDPARTY 1
+#define COOKIES_BLOCK_ALL 2
#define UA_SPOOF_NO 0
#define UA_SPOOF_WIN7_TORBROWSER 1
#define UA_SPOOF_SAFARI_MAC 2
+#define PIPELINING_OFF 0
+#define PIPELINING_ON 1
+
+#define DNT_HEADER_UNSET 0
+#define DNT_HEADER_CANTRACK 1
+#define DNT_HEADER_NOTRACK 2
+
#define X_DEVICE_IS_IPHONE 0
#define X_DEVICE_IS_IPAD 1
#define X_DEVICE_IS_SIM 2
@@ -33,12 +40,8 @@
@property (nonatomic) WebViewController *appWebView;
-@property (nonatomic) Byte spoofUserAgent;
-@property (nonatomic) Byte dntHeader;
-@property (nonatomic) Boolean usePipelining;
-
-// either nil (for standard "onionbrowser:start" ) or url given by a "onionbrowser://" (HTTP)
-// or "onionbrowsers://" (HTTPS) callback url
+// either nil (to load regular homepage) or url given by a "onionbrowser://" (HTTP)
+// or "onionbrowsers://" (HTTPS) callback url -- when this app is started from another app
@property (nonatomic) NSURL *startUrl;
// list for known domains w/self-signed certs
@@ -52,5 +55,9 @@
- (NSUInteger) deviceType;
- (Boolean) isRunningTests;
+- (NSString *)settingsFile;
+- (NSMutableDictionary *)getSettings;
+- (void)saveSettings:(NSMutableDictionary *)settings;
+- (NSString *)homepage;
@end
View
62 OnionBrowser/OnionBrowser/AppDelegate.m
@@ -14,9 +14,6 @@
@implementation AppDelegate
@synthesize
- spoofUserAgent,
- dntHeader,
- usePipelining,
sslWhitelistedDomains,
startUrl,
appWebView,
@@ -50,9 +47,15 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
sslWhitelistedDomains = [[NSMutableArray alloc] init];
- spoofUserAgent = UA_SPOOF_NO;
- dntHeader = DNT_HEADER_UNSET;
- usePipelining = YES;
+ NSMutableDictionary *settings = self.getSettings;
+ NSInteger cookieSetting = [[settings valueForKey:@"cookies"] integerValue];
+ if (cookieSetting == COOKIES_ALLOW_ALL) {
+ [[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
+ } else if (cookieSetting == COOKIES_BLOCK_THIRDPARTY) {
+ [[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain];
+ } else if (cookieSetting == COOKIES_BLOCK_ALL) {
+ [[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyNever];
+ }
// Start the spinner for the "connecting..." phase
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
@@ -308,5 +311,52 @@ - (Boolean)isRunningTests {
}
+- (NSString *)settingsFile {
+ return [[[self applicationDocumentsDirectory] path] stringByAppendingPathComponent:@"Settings.plist"];
+}
+
+- (NSMutableDictionary *)getSettings {
+ NSString *errorDesc = nil;
+ NSPropertyListFormat format;
+ NSData *plistXML = [[NSFileManager defaultManager] contentsAtPath:self.settingsFile];
+ if (plistXML == nil) {
+ // We didn't have a settings file, so we'll want to initialize one now.
+ NSMutableDictionary *d = [NSMutableDictionary dictionary];
+ // SETTINGS DEFAULTS
+ [d setObject:@"onionbrowser:home" forKey:@"homepage"]; // DEFAULT HOMEPAGE
+ [d setObject:[NSNumber numberWithInteger:COOKIES_BLOCK_THIRDPARTY] forKey:@"cookies"];
+ [d setObject:[NSNumber numberWithInteger:UA_SPOOF_NO] forKey:@"uaspoof"];
+ [d setObject:[NSNumber numberWithInteger:PIPELINING_ON] forKey:@"pipelining"];
+ [d setObject:[NSNumber numberWithInteger:DNT_HEADER_UNSET] forKey:@"dnt"];
+ // END SETTINGS DEFAULTS
+ [self saveSettings:d];
+ return d;
+ } else {
+ return (NSMutableDictionary *)[NSPropertyListSerialization
+ propertyListFromData:plistXML
+ mutabilityOption:NSPropertyListMutableContainersAndLeaves
+ format:&format errorDescription:&errorDesc];
+ }
+}
+
+- (void)saveSettings:(NSMutableDictionary *)settings {
+ NSError *error;
+ NSData *data =
+ [NSPropertyListSerialization dataWithPropertyList:settings
+ format:NSPropertyListXMLFormat_v1_0
+ options:0
+ error:&error];
+ if (data == nil) {
+ NSLog (@"error serializing to xml: %@", error);
+ return;
+ } else {
+ [data writeToFile:self.settingsFile atomically:YES];
+ }
+}
+
+- (NSString *)homepage {
+ NSMutableDictionary *d = self.getSettings;
+ return [d objectForKey:@"homepage"];
+}
@end
View
97 OnionBrowser/OnionBrowser/SettingsTableViewController.m
@@ -93,7 +93,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
}
if(indexPath.section == 0) {
- cell.textLabel.text = @"https://check.torproject.org/";
+ AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
+ NSMutableDictionary *settings2 = appDelegate.getSettings;
+ cell.textLabel.text = [settings2 objectForKey:@"homepage"];
} else if(indexPath.section == 1) {
// Cookies
NSHTTPCookie *cookie;
@@ -128,23 +130,26 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
} else if (indexPath.section == 2) {
// User-Agent
AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
+ NSMutableDictionary *settings = appDelegate.getSettings;
+ NSInteger spoofUserAgent = [[settings valueForKey:@"uaspoof"] integerValue];
+
if (indexPath.row == 0) {
cell.textLabel.text = @"No Spoofing: iOS Safari";
- if (appDelegate.spoofUserAgent == UA_SPOOF_NO) {
+ if (spoofUserAgent == UA_SPOOF_NO) {
cell.accessoryType = UITableViewCellAccessoryCheckmark;
} else {
cell.accessoryType = UITableViewCellAccessoryNone;
}
} else if (indexPath.row == 1) {
cell.textLabel.text = @"Windows 7 (NT 6.1), Firefox 17";
- if (appDelegate.spoofUserAgent == UA_SPOOF_WIN7_TORBROWSER) {
+ if (spoofUserAgent == UA_SPOOF_WIN7_TORBROWSER) {
cell.accessoryType = UITableViewCellAccessoryCheckmark;
} else {
cell.accessoryType = UITableViewCellAccessoryNone;
}
} else if (indexPath.row == 2) {
cell.textLabel.text = @"Mac OS X 10.8.4, Safari 6.0";
- if (appDelegate.spoofUserAgent == UA_SPOOF_SAFARI_MAC) {
+ if (spoofUserAgent == UA_SPOOF_SAFARI_MAC) {
cell.accessoryType = UITableViewCellAccessoryCheckmark;
} else {
cell.accessoryType = UITableViewCellAccessoryNone;
@@ -153,17 +158,19 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
} else if (indexPath.section == 3) {
// Pipelining
AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
-
+ NSMutableDictionary *settings = appDelegate.getSettings;
+ NSInteger usePipelining = [[settings valueForKey:@"pipelining"] integerValue];
+
if (indexPath.row == 0) {
cell.textLabel.text = @"Enabled (Better Performance)";
- if (appDelegate.usePipelining == YES) {
+ if (usePipelining == YES) {
cell.accessoryType = UITableViewCellAccessoryCheckmark;
} else {
cell.accessoryType = UITableViewCellAccessoryNone;
}
} else if (indexPath.row == 1) {
cell.textLabel.text = @"Disabled (Better Compatibility)";
- if (appDelegate.usePipelining == NO) {
+ if (usePipelining == NO) {
cell.accessoryType = UITableViewCellAccessoryCheckmark;
} else {
cell.accessoryType = UITableViewCellAccessoryNone;
@@ -172,17 +179,19 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
} else if (indexPath.section == 4) {
// DNT
AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
-
+ NSMutableDictionary *settings = appDelegate.getSettings;
+ NSInteger dntHeader = [[settings valueForKey:@"dnt"] integerValue];
+
if (indexPath.row == 0) {
cell.textLabel.text = @"No Header";
- if (appDelegate.dntHeader == DNT_HEADER_UNSET) {
+ if (dntHeader == DNT_HEADER_UNSET) {
cell.accessoryType = UITableViewCellAccessoryCheckmark;
} else {
cell.accessoryType = UITableViewCellAccessoryNone;
}
} else if (indexPath.row == 1) {
cell.textLabel.text = @"Opt Out Of Tracking";
- if (appDelegate.dntHeader == DNT_HEADER_NOTRACK) {
+ if (dntHeader == DNT_HEADER_NOTRACK) {
cell.accessoryType = UITableViewCellAccessoryCheckmark;
} else {
cell.accessoryType = UITableViewCellAccessoryNone;
@@ -217,37 +226,50 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
#pragma mark - Table view delegate
-- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
- if(indexPath.section == 0) {
- return YES;
- }
- return NO;
-}
-
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if(indexPath.section == 0) {
- UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"Home Page" message:@"Home page URL:" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Save",nil];
+ UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"Home Page" message:@"Leave blank to use default\nhome page with Tor Check." delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Save",nil];
alert.alertViewStyle = UIAlertViewStylePlainTextInput;
+ UITextField *textField = [alert textFieldAtIndex:0];
+
+ AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
+ NSMutableDictionary *settings2 = appDelegate.getSettings;
+ textField.text = [settings2 objectForKey:@"homepage"];
+
[alert show];
} else if(indexPath.section == 1) {
// Cookies
+ AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
+ NSMutableDictionary *settings = appDelegate.getSettings;
+
if (indexPath.row == 0) {
+ [settings setObject:[NSNumber numberWithInteger:COOKIES_ALLOW_ALL] forKey:@"uaspoof"];
+ [appDelegate saveSettings:settings];
[[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
} else if (indexPath.row == 1) {
+ [settings setObject:[NSNumber numberWithInteger:COOKIES_BLOCK_THIRDPARTY] forKey:@"uaspoof"];
+ [appDelegate saveSettings:settings];
[[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain];
} else if (indexPath.row == 2) {
+ [settings setObject:[NSNumber numberWithInteger:COOKIES_BLOCK_ALL] forKey:@"uaspoof"];
+ [appDelegate saveSettings:settings];
[[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyNever];
}
} else if (indexPath.section == 2) {
// User-Agent
AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
+ NSMutableDictionary *settings = appDelegate.getSettings;
+
if (indexPath.row == 0) {
- appDelegate.spoofUserAgent = UA_SPOOF_NO;
+ [settings setObject:[NSNumber numberWithInteger:UA_SPOOF_NO] forKey:@"uaspoof"];
+ [appDelegate saveSettings:settings];
} else {
if (indexPath.row == 1) {
- appDelegate.spoofUserAgent = UA_SPOOF_WIN7_TORBROWSER;
+ [settings setObject:[NSNumber numberWithInteger:UA_SPOOF_WIN7_TORBROWSER] forKey:@"uaspoof"];
+ [appDelegate saveSettings:settings];
} else if (indexPath.row == 2) {
- appDelegate.spoofUserAgent = UA_SPOOF_SAFARI_MAC;
+ [settings setObject:[NSNumber numberWithInteger:UA_SPOOF_SAFARI_MAC] forKey:@"uaspoof"];
+ [appDelegate saveSettings:settings];
}
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil
message:[NSString stringWithFormat:@"User Agent spoofing enabled.\n\nNote that JavaScript cannot be disabled due to framework limitations. Scripts and other iOS features may still identify your browser.\n\nSome mobile or tablet websites may not work properly without the original mobile User Agent."]
@@ -259,24 +281,32 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
} else if (indexPath.section == 3) {
// Pipelining
AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
+ NSMutableDictionary *settings = appDelegate.getSettings;
+
if (indexPath.row == 0) {
- appDelegate.usePipelining = YES;
+ [settings setObject:[NSNumber numberWithInteger:PIPELINING_ON] forKey:@"pipelining"];
+ [appDelegate saveSettings:settings];
} else if (indexPath.row == 1) {
- appDelegate.usePipelining = NO;
+ [settings setObject:[NSNumber numberWithInteger:PIPELINING_OFF] forKey:@"pipelining"];
+ [appDelegate saveSettings:settings];
}
} else if (indexPath.section == 4) {
// DNT
AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
+ NSMutableDictionary *settings = appDelegate.getSettings;
+
if (indexPath.row == 0) {
- appDelegate.dntHeader = DNT_HEADER_UNSET;
+ [settings setObject:[NSNumber numberWithInteger:DNT_HEADER_UNSET] forKey:@"dnt"];
+ [appDelegate saveSettings:settings];
} else if (indexPath.row == 1) {
- UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil
+ [settings setObject:[NSNumber numberWithInteger:DNT_HEADER_NOTRACK] forKey:@"dnt"];
+ [appDelegate saveSettings:settings];
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil
message:[NSString stringWithFormat:@"Onion Browser will now send the 'DNT: 1' header. Note that because only very new browsers send this optional header, this opt-in feature may allow websites to uniquely identify you."]
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
- appDelegate.dntHeader = DNT_HEADER_NOTRACK;
}
} else if (indexPath.section == 5) {
AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
@@ -294,8 +324,21 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
if (buttonIndex == 1) {
- NSLog(@"Entered: %d %@", buttonIndex, [[alertView textFieldAtIndex:0] text]);
+ AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
+ NSMutableDictionary *settings = appDelegate.getSettings;
+
+ if ([[[alertView textFieldAtIndex:0] text] length] == 0) {
+ [settings setValue:@"onionbrowser:home" forKey:@"homepage"]; // DEFAULT HOMEPAGE
+ } else {
+ [settings setValue:[[alertView textFieldAtIndex:0] text] forKey:@"homepage"];
+ }
+ [appDelegate saveSettings:settings];
+ [self.tableView reloadData];
}
}
+
+
+
+
@end
View
10 OnionBrowser/OnionBrowser/WebViewController.m
@@ -85,7 +85,7 @@ - (void)renderTorStatus: (NSString *)statusLine {
if (summary_loc2.location != NSNotFound)
summary_str = [summary_str substringToIndex:summary_loc2.location];
- NSString *status = [NSString stringWithFormat:@"Connecting… %@%%\n%@\n\nIf this takes longer than a minute, please close and re-open the app.\n\nIf problem persists, you can try connecting via Tor bridges by pressing the \"options\" button below.\n\nVisit http://onionbrowser.com/help/ if you need help with bridges or if you continue to have issues.",
+ NSString *status = [NSString stringWithFormat:@"Connecting… %@%%\n%@\n\nIf this takes longer than a minute, please close and re-open the app.\n\nIf problem persists, you can try connecting via Tor bridges by\npressing the middle (settings)\nbutton below.\n\nVisit the site below if you need help\nwith bridges or if you continue\nto have issues:\nhttp://onionbrowser.com/help/",
progress_str,
summary_str];
loadingStatus.text = status;
@@ -99,12 +99,13 @@ -(void)loadURL: (NSURL *)navigationURL {
}
AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
+ NSMutableDictionary *settings = appDelegate.getSettings;
// Build request and go.
_myWebView.delegate = self;
_myWebView.scalesPageToFit = YES;
NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:navigationURL];
- [req setHTTPShouldUsePipelining:appDelegate.usePipelining];
+ [req setHTTPShouldUsePipelining:[[settings valueForKey:@"pipelining"] integerValue]];
[_myWebView loadRequest:req];
_addressField.enabled = YES;
@@ -247,7 +248,7 @@ - (void)viewDidLoad {
delegate:self
cancelButtonTitle:@"Close"
destructiveButtonTitle:@"New Identity"
- otherButtonTitles:@"Bookmark Current Page", @"Browser Settings", @"Open Start Page", @"About Onion Browser", nil];
+ otherButtonTitles:@"Bookmark Current Page", @"Browser Settings", @"Open Home Page", @"About Onion Browser", nil];
// (/actionsheets)
@@ -671,7 +672,8 @@ - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger
////////////////////////////////////////////////////////
// New Identity OR Return To Home
////////////////////////////////////////////////////////
- [self loadURL:[NSURL URLWithString:@"onionbrowser:start"]];
+ AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
+ [self loadURL:[NSURL URLWithString:appDelegate.homepage]];
} else if (buttonIndex == 4) {
////////////////////////////////////////////////////////
// About Page
View
14 OnionBrowser/ProxyURLProtocol.m
@@ -31,10 +31,12 @@ -(id)initWithRequest:(NSURLRequest *)request
client:(id <NSURLProtocolClient>)client {
AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
+ NSMutableDictionary *settings = appDelegate.getSettings;
// Modify request
NSMutableURLRequest *myRequest = [request mutableCopy];
- [myRequest setHTTPShouldUsePipelining:appDelegate.usePipelining];
+
+ [myRequest setHTTPShouldUsePipelining:[[settings valueForKey:@"pipelining"] integerValue]];
self = [super initWithRequest:myRequest
cachedResponse:cachedResponse
@@ -94,9 +96,6 @@ + (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request {
- (void)startLoading {
if ([[[[self request] URL] scheme] isEqualToString:@"onionbrowser"]) {
- /*
- This is either "onionbrowser:start" or "onionbrowser:about".
- */
NSURL *url;
NSString *resourcePath = [[NSBundle mainBundle] resourcePath];
resourcePath = [resourcePath stringByReplacingOccurrencesOfString:@"/" withString:@"//"];
@@ -105,7 +104,7 @@ - (void)startLoading {
/* onionbrowser:about */
url = [NSURL URLWithString: [NSString stringWithFormat:@"file:/%@/about.html",resourcePath]];
} else if ([[[[self request] URL] absoluteString] rangeOfString:@"start2"].location != NSNotFound) {
- /* onionbrowser:start2 */
+ /* onionbrowser:start2 -- inner iframe banner */
url = [NSURL URLWithString: [NSString stringWithFormat:@"file:/%@/startup2.html",resourcePath]];
} else if ([[[[self request] URL] absoluteString] rangeOfString:@"icon"].location != NSNotFound) {
/* onionbrowser:icon */
@@ -120,7 +119,7 @@ - (void)startLoading {
[alert show];
url = [NSURL URLWithString: [NSString stringWithFormat:@"file:/%@/startup.html",resourcePath]];
} else {
- /* onionbrowser:startup */
+ /* onionbrowser:home */
url = [NSURL URLWithString: [NSString stringWithFormat:@"file:/%@/startup.html",resourcePath]];
}
NSMutableURLRequest *newRequest = [NSMutableURLRequest requestWithURL:url];
@@ -209,9 +208,10 @@ - (void)HTTPConnection:(CKHTTPConnection *)connection didReceiveResponse:(NSHTTP
NSLog(@"[ProxyURLProtocol] Got %d redirect from %@ to %@", response.statusCode, _request.URL, newURL);
#endif
AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
+ NSMutableDictionary *settings = appDelegate.getSettings;
NSMutableURLRequest *newRequest = [_request mutableCopy];
- [newRequest setHTTPShouldUsePipelining:appDelegate.usePipelining];
+ [newRequest setHTTPShouldUsePipelining:[[settings valueForKey:@"pipelining"] integerValue]];
newRequest.URL = [NSURL URLWithString:newURL relativeToURL:_request.URL];
_request = newRequest;
[[self client] URLProtocol:self wasRedirectedToRequest:_request redirectResponse:response];
View
2  OnionBrowser/TorController.m
@@ -282,7 +282,7 @@ - (void)netsocket:(ULINetSocket*)inNetSocket dataAvailable:(unsigned)inAmount {
} else {
// Didn't launch with a "onionbrowser://" or "onionbrowsers://" URL
// so just launch regular start page.
- [wvc loadURL:[NSURL URLWithString:@"onionbrowser:start"]];
+ [wvc loadURL:[NSURL URLWithString:appDelegate.homepage]];
}
didFirstConnect = YES;
Please sign in to comment.
Something went wrong with that request. Please try again.