mirror of
https://github.com/zhigang1992/shadowsocks-iOS.git
synced 2026-04-23 20:40:07 +08:00
add about view; close #7
This commit is contained in:
BIN
Crashlytics.framework/Versions/A/Crashlytics
vendored
BIN
Crashlytics.framework/Versions/A/Crashlytics
vendored
Binary file not shown.
@@ -15,13 +15,13 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0.9</string>
|
||||
<string>2.1</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0200.09.00</string>
|
||||
<string>5</string>
|
||||
<key>DTPlatformName</key>
|
||||
<string>iphoneos</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
|
||||
BIN
Crashlytics.framework/run
vendored
BIN
Crashlytics.framework/run
vendored
Binary file not shown.
2
LICENSE
2
LICENSE
@@ -1,4 +1,4 @@
|
||||
ShadowWeb (Shadowsocks for iOS)
|
||||
Shadowsocks for iOS
|
||||
|
||||
Copyright (C) 2013 clowwindy <clowwindy42@gmail.com>
|
||||
|
||||
|
||||
21
ShadowWeb/SWBAboutController.h
Normal file
21
ShadowWeb/SWBAboutController.h
Normal file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// Created by clowwindy on 7/7/13.
|
||||
// Copyright (c) 2013 clowwindy. All rights reserved.
|
||||
//
|
||||
// To change the template use AppCode | Preferences | File Templates.
|
||||
//
|
||||
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <MessageUI/MessageUI.h>
|
||||
#import <MessageUI/MFMailComposeViewController.h>
|
||||
|
||||
|
||||
|
||||
@interface SWBAboutController : UITableViewController <MFMailComposeViewControllerDelegate> {
|
||||
|
||||
}
|
||||
|
||||
@property (nonatomic, weak) UIPopoverController *myPopoverController;
|
||||
|
||||
@end
|
||||
237
ShadowWeb/SWBAboutController.m
Normal file
237
ShadowWeb/SWBAboutController.m
Normal file
@@ -0,0 +1,237 @@
|
||||
//
|
||||
// Created by clowwindy on 7/7/13.
|
||||
// Copyright (c) 2013 clowwindy. All rights reserved.
|
||||
//
|
||||
// To change the template use AppCode | Preferences | File Templates.
|
||||
//
|
||||
|
||||
|
||||
#import "SWBAboutController.h"
|
||||
|
||||
|
||||
@implementation SWBAboutController {
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (id)initWithStyle:(UITableViewStyle)style
|
||||
{
|
||||
self = [super initWithStyle:style];
|
||||
if (self) {
|
||||
// Custom initialization
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning
|
||||
{
|
||||
// Releases the view if it doesn't have a superview.
|
||||
[super didReceiveMemoryWarning];
|
||||
|
||||
// Release any cached data, images, etc that aren't in use.
|
||||
}
|
||||
|
||||
#pragma mark - View lifecycle
|
||||
|
||||
- (void)deviceOrientationDidChange:(NSNotification *)notification {
|
||||
//Obtaining the current device orientation
|
||||
[[self tableView] reloadSections:[NSIndexSet indexSetWithIndex:1] withRowAnimation:UITableViewRowAnimationFade];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
self.contentSizeForViewInPopover = CGSizeMake(320, 480);
|
||||
|
||||
UIBarButtonItem *done = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(cancel)];
|
||||
self.navigationItem.rightBarButtonItem = done;
|
||||
|
||||
self.tableView.scrollEnabled = NO;
|
||||
|
||||
self.navigationItem.title = NSLocalizedString(@"About", nil);
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(deviceOrientationDidChange:) name: UIDeviceOrientationDidChangeNotification object: nil];
|
||||
}
|
||||
|
||||
- (void)viewDidUnload
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIDeviceOrientationDidChangeNotification object:nil];
|
||||
|
||||
[super viewDidUnload];
|
||||
// Release any retained subviews of the main view.
|
||||
// e.g. self.myOutlet = nil;
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
[super viewWillAppear:animated];
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated
|
||||
{
|
||||
[super viewDidAppear:animated];
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated
|
||||
{
|
||||
[super viewWillDisappear:animated];
|
||||
}
|
||||
|
||||
- (void)viewDidDisappear:(BOOL)animated
|
||||
{
|
||||
[super viewDidDisappear:animated];
|
||||
}
|
||||
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
|
||||
{
|
||||
// Return YES for supported orientations
|
||||
return YES;
|
||||
}
|
||||
|
||||
-(void)cancel {
|
||||
[self dismissModalViewControllerAnimated:YES];
|
||||
if (self->_myPopoverController) {
|
||||
[_myPopoverController dismissPopoverAnimated:YES];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)displayComposerSheet
|
||||
{
|
||||
if (![MFMailComposeViewController canSendMail]) {
|
||||
[[[UIAlertView alloc] initWithTitle:nil message:NSLocalizedString(@"Please setup an email account.",nil) delegate:nil cancelButtonTitle:NSLocalizedString(@"OK", nil) otherButtonTitles:nil, nil] show];
|
||||
return;
|
||||
}
|
||||
|
||||
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
|
||||
picker.mailComposeDelegate = self;
|
||||
[picker setToRecipients:[NSArray arrayWithObject:@"shadowsocks@googlegroups.com"]];
|
||||
|
||||
[picker setSubject:NSLocalizedString(@"Shadowsocks for iOS Support", nil)];
|
||||
UIDevice *device = [UIDevice currentDevice];
|
||||
NSString *content = [NSString stringWithFormat:@"%@\n\n\n\n\n\nTechnical Info:\n\n%@ %@\nLanguage: %@\nDevice name: %@\nDevice model: %@\nUser Interface Idiom: %@\nSystem Name: %@\nSystem Version: %@\n",
|
||||
NSLocalizedString(@"Enter your feedback or questions:", nil),
|
||||
NSLocalizedString(@"Shadowsocks for iOS", nil),
|
||||
[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey],
|
||||
[[NSLocale preferredLanguages] objectAtIndex:0],
|
||||
[device name],
|
||||
[device model],
|
||||
[device userInterfaceIdiom] == UIUserInterfaceIdiomPad?@"iPad":@"iPhone",
|
||||
[device systemName],
|
||||
[device systemVersion]
|
||||
];
|
||||
|
||||
[picker setMessageBody:content isHTML:NO];
|
||||
|
||||
[self presentModalViewController:picker animated:YES];
|
||||
}
|
||||
|
||||
- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error
|
||||
{
|
||||
[self dismissModalViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
#pragma mark - Table view data source
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
||||
{
|
||||
// Return the number of sections.
|
||||
return 2;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
// Return the number of rows in the section.
|
||||
if (section == 0) {
|
||||
return 4;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
|
||||
UITableViewCell *cell = [[UITableViewCell alloc] initWithFrame:CGRectMake(0, 0, 320, 40)];
|
||||
|
||||
// Configure the cell...
|
||||
if (indexPath.section == 0) {
|
||||
if (indexPath.row == 0) {
|
||||
cell.textLabel.text = NSLocalizedString(@"Version", nil);
|
||||
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100.0f, 26.0f)];
|
||||
label.textAlignment = UITextAlignmentRight;
|
||||
label.text = [NSString stringWithFormat:@"%@", [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey]];
|
||||
cell.accessoryView = label;
|
||||
label.textColor = [UIColor colorWithRed:0.0f green:0.3f blue:0.4f alpha:1.0f];
|
||||
label.backgroundColor = [UIColor clearColor];
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
} else if (indexPath.row == 1) {
|
||||
cell.textLabel.text = NSLocalizedString(@"Email", nil);
|
||||
} else if (indexPath.row == 2) {
|
||||
cell.textLabel.text = NSLocalizedString(@"Visit Website", nil);
|
||||
} else if(indexPath.row == 3) {
|
||||
cell.textLabel.text = NSLocalizedString(@"Rate This App", nil);
|
||||
}
|
||||
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
|
||||
} else {
|
||||
NSError *error = nil;
|
||||
NSString *result = [[NSString alloc] initWithContentsOfURL:[[NSBundle mainBundle] URLForResource:@"about" withExtension:@"txt"] encoding:NSUTF8StringEncoding error:&error];
|
||||
result = [result stringByReplacingOccurrencesOfString:@"\n\n" withString:@"ADSAFSDFSF"];
|
||||
result = [result stringByReplacingOccurrencesOfString:@"\n" withString:@" "];
|
||||
result = [result stringByReplacingOccurrencesOfString:@"ADSAFSDFSF" withString:@"\n\n"];
|
||||
if (error != nil) {
|
||||
result = nil;
|
||||
}
|
||||
UITextView *textView = [[UITextView alloc] init];
|
||||
textView.frame = CGRectMake(0, 8.0f, cell.frame.size.width, cell.frame.size.height - 16.0f);
|
||||
textView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
|
||||
textView.text = result;
|
||||
textView.backgroundColor = [UIColor clearColor];
|
||||
[cell.contentView addSubview:textView];
|
||||
textView.editable = NO;
|
||||
textView.font = [UIFont fontWithName:@"Helvetica-Bold" size:12.0f];
|
||||
textView.textColor = [UIColor grayColor];
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (indexPath.section == 1) {
|
||||
|
||||
UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
|
||||
if (UIDeviceOrientationIsLandscape(orientation)) {
|
||||
return 390;
|
||||
} else {
|
||||
return 640;
|
||||
}
|
||||
}
|
||||
return 40;
|
||||
}
|
||||
|
||||
-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
|
||||
if (section == 1) {
|
||||
return NSLocalizedString(@"Legal notes:", nil);
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
#pragma mark - Table view delegate
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
if (indexPath.section == 0) {
|
||||
NSUInteger row = indexPath.row;
|
||||
if (row == 1) {
|
||||
[self displayComposerSheet];
|
||||
}
|
||||
else if (row == 2) {
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://github.com/shadowsocks/shadowsocks-iOS/"]];
|
||||
} else if(row == 3) {
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://itunes.apple.com/cn/app/shadowsocks/id665729974?ls=1&mt=8"]];
|
||||
}
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
@@ -9,6 +9,7 @@
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#import "SWBViewController.h"
|
||||
#import "ProxySettingsTableViewController.h"
|
||||
#import "SWBAboutController.h"
|
||||
|
||||
#define kNewTabAddress @"shadowweb:newtab"
|
||||
#define kAboutBlank @"shadowweb:blank"
|
||||
@@ -24,13 +25,12 @@
|
||||
|
||||
#pragma mark - View lifecycle
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
|
||||
// If don't do this, you'll see some white edge when doing the rotation
|
||||
self.view.clipsToBounds = YES;
|
||||
|
||||
|
||||
currentTabTag = 0;
|
||||
CGRect bounds = self.view.bounds;
|
||||
self.tabBar = [[SWBTabBarView alloc] initWithFrame:CGRectMake(0, bounds.size.height - kTabBarHeight, bounds.size.width, kTabBarHeight)];
|
||||
@@ -41,13 +41,13 @@
|
||||
self.webViewContainer.delegate = self;
|
||||
[self initPageManager];
|
||||
[self initPagesAndTabs];
|
||||
|
||||
|
||||
|
||||
|
||||
// init address bar
|
||||
self.addrbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, bounds.size.width, kToolBarHeight)];
|
||||
|
||||
|
||||
// init bar buttons
|
||||
|
||||
|
||||
self.urlField = [[UITextField alloc] initWithFrame:CGRectInset(_addrbar.bounds, 12, 7)];
|
||||
[_urlField setBorderStyle:UITextBorderStyleRoundedRect];
|
||||
[_urlField setKeyboardType:UIKeyboardTypeURL];
|
||||
@@ -62,55 +62,53 @@
|
||||
[_urlField setClearButtonMode:UITextFieldViewModeWhileEditing];
|
||||
[_urlField setPlaceholder:@"URL"];
|
||||
[_urlField setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
|
||||
|
||||
self.cancelButton = [[UIBarButtonItem alloc] initWithTitle:_L(Cancel) style:UIBarButtonItemStyleBordered target:self action:@selector(cancel) ];
|
||||
|
||||
self.cancelButton = [[UIBarButtonItem alloc] initWithTitle:_L(Cancel) style:UIBarButtonItemStyleBordered target:self action:@selector(cancel)];
|
||||
_cancelButton.width = kCancelButtonWidth;
|
||||
|
||||
|
||||
self.addrItemsInactive = [NSMutableArray arrayWithObjects:[[UIBarButtonItem alloc] initWithCustomView:_urlField], [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil], nil];
|
||||
self.addrItemsActive = [NSMutableArray arrayWithArray:_addrItemsInactive];
|
||||
[_addrItemsActive addObject:_cancelButton];
|
||||
|
||||
|
||||
[_addrbar setItems:_addrItemsInactive];
|
||||
[_addrbar setBarStyle:UIBarStyleBlackOpaque];
|
||||
[_addrbar setTintColor:[UIColor colorWithWhite:0.6f alpha:1.0f]];
|
||||
|
||||
|
||||
// add subviews
|
||||
[self.view addSubview:_webViewContainer];
|
||||
[self.view addSubview:_addrbar];
|
||||
[self.view addSubview:_tabBar];
|
||||
|
||||
|
||||
[self relayout:bounds];
|
||||
|
||||
// Keyboard hide notification
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
selector:@selector(keyboardHiden:)
|
||||
name:UIKeyboardWillHideNotification
|
||||
object:nil];
|
||||
|
||||
addObserver:self
|
||||
selector:@selector(keyboardHiden:)
|
||||
name:UIKeyboardWillHideNotification
|
||||
object:nil];
|
||||
|
||||
// ActionSheet
|
||||
[self initActionSheet];
|
||||
|
||||
// [self play];
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning
|
||||
{
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
[_webViewContainer releaseBackgroundWebViews];
|
||||
}
|
||||
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
|
||||
{
|
||||
return YES;
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||
return YES;
|
||||
}
|
||||
|
||||
-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
|
||||
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
|
||||
[self scrollViewDidScroll:[self currentWebView].scrollView];
|
||||
}
|
||||
|
||||
-(void)viewWillLayoutSubviews {
|
||||
- (void)viewWillLayoutSubviews {
|
||||
[self relayout:self.view.bounds];
|
||||
}
|
||||
|
||||
@@ -123,7 +121,7 @@
|
||||
_tabBar.frame = tabBarRect;
|
||||
}
|
||||
|
||||
-(void)viewDidAppear:(BOOL)animated {
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
if ([ProxySettingsTableViewController settingsAreNotComplete]) {
|
||||
[self showSettings];
|
||||
}
|
||||
@@ -131,9 +129,9 @@
|
||||
|
||||
#pragma mark - webview
|
||||
|
||||
-(void)updateWebViewTitle:(UIWebView *)webView {
|
||||
NSString *title = [_webViewContainer titleForWebView:(SWBWebView *)webView];
|
||||
|
||||
- (void)updateWebViewTitle:(UIWebView *)webView {
|
||||
NSString *title = [_webViewContainer titleForWebView:(SWBWebView *) webView];
|
||||
|
||||
SWBPage *page = [_pageManager pageByTag:webView.tag];
|
||||
if (title) {
|
||||
page.title = title;
|
||||
@@ -146,10 +144,10 @@
|
||||
title = NSLocalizedString(@"Untitled", "Untitled");
|
||||
}
|
||||
}
|
||||
[_tabBar setTitleForTab:webView.tag title: title];
|
||||
[_tabBar setTitleForTab:webView.tag title:title];
|
||||
}
|
||||
|
||||
-(void)openURL:(NSString *)urlString {
|
||||
- (void)openURL:(NSString *)urlString {
|
||||
NSURL *url = [NSURL URLWithString:urlString];
|
||||
if (!url || [urlString rangeOfString:@":"].length == 0) {
|
||||
urlString = [@"http://" stringByAppendingString:urlString];
|
||||
@@ -161,35 +159,34 @@
|
||||
[_webViewContainer.currentSWBWebView loadRequest:request];
|
||||
}
|
||||
} else {
|
||||
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:_L(incorrect URL) delegate:nil cancelButtonTitle:_L(OK) otherButtonTitles:nil];
|
||||
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:_L(incorrect
|
||||
URL) delegate:nil cancelButtonTitle:_L(OK) otherButtonTitles:nil];
|
||||
[alert show];
|
||||
}
|
||||
}
|
||||
|
||||
-(SWBWebView *)currentWebView {
|
||||
- (SWBWebView *)currentWebView {
|
||||
return [_webViewContainer currentSWBWebView];
|
||||
}
|
||||
|
||||
-(void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {
|
||||
|
||||
- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {
|
||||
|
||||
}
|
||||
|
||||
-(BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
|
||||
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
|
||||
BOOL result = YES;
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
// NSLog(@"shouldStartLoadWithRequest tag:%d navtype:%d %@", webView.tag, navigationType, [request URL]);
|
||||
#endif
|
||||
// NSString *scheme = [[request URL] scheme];
|
||||
|
||||
if ([[[request URL] absoluteString] caseInsensitiveCompare:kNewTabAddress] == NSOrderedSame)
|
||||
{
|
||||
|
||||
if ([[[request URL] absoluteString] caseInsensitiveCompare:kNewTabAddress] == NSOrderedSame) {
|
||||
// [self openLinkInNewTab:[(SWBWebView *)webView lastClickedLink]];
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
if (navigationType == UIWebViewNavigationTypeLinkClicked ||
|
||||
navigationType == UIWebViewNavigationTypeBackForward) {
|
||||
navigationType == UIWebViewNavigationTypeBackForward) {
|
||||
SWBPage *page = [_pageManager pageByTag:webView.tag];
|
||||
NSString *url = [[request URL] absoluteString];
|
||||
page.url = url;
|
||||
@@ -198,30 +195,30 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
-(void)webViewDidFinishLoad:(UIWebView *)webView {
|
||||
- (void)webViewDidFinishLoad:(UIWebView *)webView {
|
||||
[self resetTabBarButtonsStatus];
|
||||
[self updateWebViewTitle:webView];
|
||||
|
||||
|
||||
[_tabBar setLoadingForTab:webView.tag loading:NO];
|
||||
|
||||
if ([[[[webView request] URL] absoluteString] caseInsensitiveCompare: [(SWBWebView *)webView locationHref]] == NSOrderedSame) {
|
||||
if ([[[[webView request] URL] absoluteString] caseInsensitiveCompare:[(SWBWebView *) webView locationHref]] == NSOrderedSame) {
|
||||
NSString *url = [[[webView request] URL] absoluteString];
|
||||
NSString *title = [((SWBWebView *)webView) pageTitle];
|
||||
NSString *title = [((SWBWebView *) webView) pageTitle];
|
||||
_urlField.text = url;
|
||||
SWBPage *page = [_pageManager pageByTag:webView.tag];
|
||||
page.url = url;
|
||||
page.title = title;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
-(void)webViewDidStartLoad:(UIWebView *)webView {
|
||||
- (void)webViewDidStartLoad:(UIWebView *)webView {
|
||||
[_tabBar setLoadingForTab:webView.tag loading:YES];
|
||||
}
|
||||
|
||||
#pragma mark - WebView Scrolling
|
||||
|
||||
-(void)initWebViewScrolling:(SWBWebView *)webView {
|
||||
- (void)initWebViewScrolling:(SWBWebView *)webView {
|
||||
UIScrollView *scrollView = webView.scrollView;
|
||||
scrollView.delegate = self;
|
||||
[scrollView setContentInset:UIEdgeInsetsMake(kToolBarHeight, 0, 0, 0)];
|
||||
@@ -230,7 +227,7 @@
|
||||
[self scrollViewDidScroll:scrollView];
|
||||
}
|
||||
|
||||
-(void)scrollViewDidScroll:(UIScrollView *)scrollView {
|
||||
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
|
||||
if ([self currentWebView].scrollView == scrollView) {
|
||||
if (scrollView.contentOffset.y < 0) {
|
||||
[scrollView setScrollIndicatorInsets:UIEdgeInsetsMake(-scrollView.contentOffset.y, 0, 0, 0)];
|
||||
@@ -243,12 +240,13 @@
|
||||
|
||||
#pragma mark - ActionSheet
|
||||
|
||||
-(void)initActionSheet {
|
||||
self.actionSheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:_L(Cancel) destructiveButtonTitle:nil otherButtonTitles:_L(New Tab), _L(Back), _L(Forward), _L(Reload), _L(Settings), _L(Help), _L(About), nil];
|
||||
- (void)initActionSheet {
|
||||
self.actionSheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:_L(Cancel) destructiveButtonTitle:nil otherButtonTitles:_L(New
|
||||
Tab), _L(Back), _L(Forward), _L(Reload), _L(Settings), _L(Help), _L(About), nil];
|
||||
[_actionSheet setActionSheetStyle:UIActionSheetStyleBlackTranslucent];
|
||||
}
|
||||
|
||||
-(void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex {
|
||||
- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex {
|
||||
switch (buttonIndex) {
|
||||
case 0:
|
||||
[self openLinkInNewTab:kNewTabAddress];
|
||||
@@ -271,15 +269,32 @@
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://github.com/shadowsocks/shadowsocks-iOS/wiki/Help"]];
|
||||
break;
|
||||
case 6:
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://github.com/shadowsocks/shadowsocks-iOS/blob/master/About.md"]];
|
||||
[self showAbout];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)showAbout {
|
||||
SWBAboutController *settingsController = [[SWBAboutController alloc] initWithStyle:UITableViewStyleGrouped];
|
||||
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:settingsController];
|
||||
// nav.navigationBar.tintColor = [UIColor blackColor];
|
||||
nav.navigationBar.barStyle = UIBarStyleBlackOpaque;
|
||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
||||
settingsPC = [[UIPopoverController alloc] initWithContentViewController:nav];
|
||||
settingsController.myPopoverController = settingsPC;
|
||||
CGRect newTabRect = [self.tabBar aNewTabButton].frame;
|
||||
newTabRect.size.width = newTabRect.size.height;
|
||||
CGRect rect = [self.tabBar convertRect:newTabRect toView:self.view];
|
||||
[settingsPC presentPopoverFromRect:rect inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
|
||||
} else {
|
||||
[self presentModalViewController:nav animated:YES];
|
||||
}
|
||||
|
||||
-(void) showSettings {
|
||||
}
|
||||
|
||||
- (void)showSettings {
|
||||
ProxySettingsTableViewController *settingsController = [[ProxySettingsTableViewController alloc] initWithStyle:UITableViewStyleGrouped];
|
||||
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:settingsController];
|
||||
// nav.navigationBar.tintColor = [UIColor blackColor];
|
||||
@@ -299,7 +314,7 @@
|
||||
#pragma mark - TabBar
|
||||
|
||||
|
||||
-(void)resetTabBarButtonsStatus {
|
||||
- (void)resetTabBarButtonsStatus {
|
||||
// SWBWebView *currentWebView = [self currentWebView];
|
||||
// backButton.enabled = currentWebView.canGoBack;
|
||||
// forwardButton.enabled = currentWebView.canGoForward;
|
||||
@@ -322,7 +337,7 @@
|
||||
}
|
||||
|
||||
|
||||
-(void)tabBarViewNewTabButtonDidClick {
|
||||
- (void)tabBarViewNewTabButtonDidClick {
|
||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
||||
CGRect newTabRect = [self.tabBar aNewTabButton].frame;
|
||||
newTabRect.size.width = newTabRect.size.height;
|
||||
@@ -333,7 +348,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
-(void)tabBarViewTabDidClose:(SWBTab *)tab {
|
||||
- (void)tabBarViewTabDidClose:(SWBTab *)tab {
|
||||
// NSString *title = [[_webViewContainer webViewByTag:tab.tag] pageTitle];
|
||||
// NSString *urlString =[[_pageManager pageByTag:tab.tag] url];
|
||||
// if (urlString) {
|
||||
@@ -351,31 +366,32 @@
|
||||
if ([[_pageManager pages] count] == 0) {
|
||||
// [self tabBarViewNewTabButtonDidClick];
|
||||
[self openLinkInNewTab:@"http://www.twitter.com/"];
|
||||
[NSTimer scheduledTimerWithTimeInterval:0.20 target:_urlField selector:@selector(becomeFirstResponder) userInfo:nil repeats:NO]; }
|
||||
[NSTimer scheduledTimerWithTimeInterval:0.20 target:_urlField selector:@selector(becomeFirstResponder) userInfo:nil repeats:NO];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)tabBarViewTabDidMove:(SWBTab *)tab toIndex:(NSInteger)index {
|
||||
- (void)tabBarViewTabDidMove:(SWBTab *)tab toIndex:(NSInteger)index {
|
||||
// [pageManager reorderPage:tabBar.tabs];
|
||||
// 目前没有必要
|
||||
}
|
||||
|
||||
-(void)tabBarViewTabDidSelect:(SWBTab *)tab {
|
||||
- (void)tabBarViewTabDidSelect:(SWBTab *)tab {
|
||||
[_webViewContainer switchToWebView:tab.tag];
|
||||
}
|
||||
|
||||
#pragma mark - page manager
|
||||
|
||||
-(void)initPageManager {
|
||||
- (void)initPageManager {
|
||||
lastTag = 0;
|
||||
self.pageManager = [[SWBPageManager alloc] init];
|
||||
[_pageManager load];
|
||||
}
|
||||
|
||||
-(NSInteger)genTag {
|
||||
return lastTag ++;
|
||||
- (NSInteger)genTag {
|
||||
return lastTag++;
|
||||
}
|
||||
|
||||
-(void)initPagesAndTabs {
|
||||
- (void)initPagesAndTabs {
|
||||
[_pageManager initMappingAndTabsByPages];
|
||||
NSArray *pages = _pageManager.pages;
|
||||
// NSInteger currentTabTag = 0;
|
||||
@@ -397,7 +413,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
-(void)savePageIndex {
|
||||
- (void)savePageIndex {
|
||||
// save page index order
|
||||
// NSArray *tabs = [tabBar tabs];
|
||||
// for (int i = 0; i < [tabs count]; i++) {
|
||||
@@ -416,7 +432,7 @@
|
||||
_tabBar.currentTab = newTab;
|
||||
}
|
||||
|
||||
-(void)openLinkInNewTab:(NSString *)urlString {
|
||||
- (void)openLinkInNewTab:(NSString *)urlString {
|
||||
SWBTab *newTab = [_tabBar newTab];
|
||||
SWBPage *page = [_pageManager addPageWithTag:newTab.tag];
|
||||
page.url = urlString;
|
||||
@@ -426,13 +442,13 @@
|
||||
}
|
||||
|
||||
|
||||
-(void)saveData {
|
||||
- (void)saveData {
|
||||
[_pageManager save];
|
||||
}
|
||||
|
||||
#pragma mark - WebViewContainer
|
||||
|
||||
-(void)syncPageManagerSelectionStatusWithSelectedTag:(NSInteger)tag {
|
||||
- (void)syncPageManagerSelectionStatusWithSelectedTag:(NSInteger)tag {
|
||||
NSNumber *yes = [NSNumber numberWithBool:YES];
|
||||
NSNumber *no = [NSNumber numberWithBool:NO];
|
||||
for (SWBPage *page in _pageManager.pages) {
|
||||
@@ -441,28 +457,28 @@
|
||||
[_pageManager pageByTag:tag].selected = yes;
|
||||
}
|
||||
|
||||
-(void)webViewContainerWebViewDidCreateNew:(SWBWebView *)webView {
|
||||
- (void)webViewContainerWebViewDidCreateNew:(SWBWebView *)webView {
|
||||
SWBPage *page = [_pageManager pageByTag:webView.tag];
|
||||
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:page.url]];
|
||||
[webView loadRequest:request];
|
||||
|
||||
|
||||
[self initWebViewScrolling:webView];
|
||||
|
||||
|
||||
[self resetTabBarButtonsStatus];
|
||||
[self syncPageManagerSelectionStatusWithSelectedTag:webView.tag];
|
||||
}
|
||||
|
||||
-(void)webViewContainerWebViewDidSwitchToWebView:(SWBWebView *)webView {
|
||||
- (void)webViewContainerWebViewDidSwitchToWebView:(SWBWebView *)webView {
|
||||
[self resetTabBarButtonsStatus];
|
||||
[self syncPageManagerSelectionStatusWithSelectedTag:webView.tag];
|
||||
_urlField.text = webView.locationHref;
|
||||
[self scrollViewDidScroll:webView.scrollView];
|
||||
}
|
||||
|
||||
-(void)webViewContainerWebViewNeedToReload:(SWBWebView *)webView tag:(NSInteger)tag {
|
||||
- (void)webViewContainerWebViewNeedToReload:(SWBWebView *)webView tag:(NSInteger)tag {
|
||||
SWBPage *page = [_pageManager pageByTag:tag];
|
||||
NSURL *url = [NSURL URLWithString:page.url];
|
||||
if (url!=nil) {
|
||||
if (url != nil) {
|
||||
NSURLRequest *request = [NSURLRequest requestWithURL:url];
|
||||
[webView loadRequest:request];
|
||||
[self resetTabBarButtonsStatus];
|
||||
@@ -473,64 +489,67 @@
|
||||
|
||||
#pragma mark - Text Field
|
||||
|
||||
-(void)hideKeyboard {
|
||||
- (void)hideKeyboard {
|
||||
[_urlField resignFirstResponder];
|
||||
[self hideCancelButton];
|
||||
}
|
||||
|
||||
-(void)hideCancelButton {
|
||||
- (void)hideCancelButton {
|
||||
[_addrbar setItems:_addrItemsInactive animated:YES];
|
||||
|
||||
|
||||
[UIView beginAnimations:nil context:NULL];
|
||||
CGRect bounds = [_addrbar bounds];
|
||||
bounds = CGRectInset(bounds, 12, 7);
|
||||
[_urlField setFrame:bounds];
|
||||
[UIView commitAnimations];
|
||||
|
||||
|
||||
}
|
||||
|
||||
-(void)cancel {
|
||||
- (void)cancel {
|
||||
[self hideKeyboard];
|
||||
}
|
||||
|
||||
|
||||
-(void)textFieldDidBeginEditing:(UITextField *)textField {
|
||||
- (void)textFieldDidBeginEditing:(UITextField *)textField {
|
||||
[_addrbar setItems:_addrItemsActive animated:YES];
|
||||
|
||||
|
||||
[UIView beginAnimations:nil context:NULL];
|
||||
CGRect bounds = [_addrbar bounds];
|
||||
bounds = CGRectInset(bounds, 12 + kCancelButtonWidth * 0.5f , 7);
|
||||
bounds = CGRectInset(bounds, 12 + kCancelButtonWidth * 0.5f, 7);
|
||||
bounds = CGRectOffset(bounds, -kCancelButtonWidth * 0.5f, 0);
|
||||
[_urlField setFrame:bounds];
|
||||
[UIView commitAnimations];
|
||||
}
|
||||
-(void)textFieldDidEndEditing {
|
||||
|
||||
- (void)textFieldDidEndEditing {
|
||||
[self hideKeyboard];
|
||||
[self openURL:_urlField.text];
|
||||
}
|
||||
-(BOOL)textFieldShouldEndEditing:(UITextField *)textField {
|
||||
|
||||
- (BOOL)textFieldShouldEndEditing:(UITextField *)textField {
|
||||
return YES;
|
||||
}
|
||||
-(void)keyboardHiden:(NSNotification *)notification {
|
||||
|
||||
- (void)keyboardHiden:(NSNotification *)notification {
|
||||
// [self hideCancelButton];
|
||||
}
|
||||
|
||||
#pragma mark audio
|
||||
|
||||
-(BOOL)canBecomeFirstResponder{
|
||||
- (BOOL)canBecomeFirstResponder {
|
||||
return YES;
|
||||
}
|
||||
|
||||
-(void)play {
|
||||
|
||||
- (void)play {
|
||||
|
||||
// Play music, so app can run in the backgound.
|
||||
AVAudioSession *session = [AVAudioSession sharedInstance];
|
||||
[session setActive:YES error:nil];
|
||||
[session setCategory:AVAudioSessionCategoryPlayback error:nil];
|
||||
|
||||
|
||||
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
|
||||
NSURL *url = [[NSBundle mainBundle] URLForResource:@"silence" withExtension:@"wav"];
|
||||
|
||||
|
||||
player = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:nil];
|
||||
[player prepareToPlay];
|
||||
[player setVolume:0];
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<string>1.0.1</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<string>1.0.1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIPrerenderedIcon</key>
|
||||
|
||||
301
about.txt
Normal file
301
about.txt
Normal file
@@ -0,0 +1,301 @@
|
||||
Shadowsocks for iOS
|
||||
|
||||
Copyright (C) 2013 clowwindy <clowwindy42@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
******
|
||||
|
||||
PAC file is created by cow
|
||||
|
||||
cow
|
||||
https://github.com/cyfdecyf/cow/
|
||||
|
||||
Copyright (c) 2012-2013 Chen Yufei. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
******
|
||||
|
||||
iProxy
|
||||
https://github.com/tcurdt/iProxy
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
******
|
||||
|
||||
GCDWebServer
|
||||
https://github.com/swisspol/GCDWebServer
|
||||
|
||||
Copyright (c) 2012-2013, Pierre-Olivier Latour
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the <organization> nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
******
|
||||
|
||||
AppProxyCap by freewizard
|
||||
https://github.com/freewizard/AppProxyCap
|
||||
Released in MIT License
|
||||
|
||||
Modified by clowwindy, with some new features
|
||||
https://github.com/clowwindy/AppProxyCap
|
||||
|
||||
******
|
||||
|
||||
Lcg 3d.gif
|
||||
http://commons.wikimedia.org/wiki/File:Lcg_3d.gif
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
|
||||
@@ -46,6 +46,7 @@
|
||||
628693FE16DA2983008B1A26 /* ev.c in Sources */ = {isa = PBXBuildFile; fileRef = 628693FD16DA2983008B1A26 /* ev.c */; };
|
||||
62CD119A175E3BD7008C4D0C /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 62CD1199175E3BD7008C4D0C /* libcrypto.a */; };
|
||||
62CD119C175E3E17008C4D0C /* table.m in Sources */ = {isa = PBXBuildFile; fileRef = 62CD119B175E3E17008C4D0C /* table.m */; };
|
||||
62CD9190178977B500B2CB55 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 62CD918F178977B500B2CB55 /* MessageUI.framework */; };
|
||||
62D85A8D176DA6FC00FE5575 /* atom.c in Sources */ = {isa = PBXBuildFile; fileRef = 62D85A4E176DA6FB00FE5575 /* atom.c */; };
|
||||
62D85A8E176DA6FC00FE5575 /* auth.c in Sources */ = {isa = PBXBuildFile; fileRef = 62D85A50176DA6FB00FE5575 /* auth.c */; };
|
||||
62D85A90176DA6FC00FE5575 /* chunk.c in Sources */ = {isa = PBXBuildFile; fileRef = 62D85A53176DA6FB00FE5575 /* chunk.c */; };
|
||||
@@ -84,6 +85,8 @@
|
||||
EB1890D6331E61914013309F /* polipo_disable.config in Resources */ = {isa = PBXBuildFile; fileRef = EB189F29205BA2AB998B867D /* polipo_disable.config */; };
|
||||
EB1891FD5CE9480608918422 /* SimpleTableViewSource.m in Sources */ = {isa = PBXBuildFile; fileRef = EB1897832237B71EF50B3DF4 /* SimpleTableViewSource.m */; };
|
||||
EB189A01F66776EC1714F32D /* 3gnet_enable.mobileconfig in Resources */ = {isa = PBXBuildFile; fileRef = EB1897A8F80969EC7477F89D /* 3gnet_enable.mobileconfig */; };
|
||||
EB189E4CAA0DEF020070DC84 /* SWBAboutController.m in Sources */ = {isa = PBXBuildFile; fileRef = EB189EE1CF6E8C6C431B87BA /* SWBAboutController.m */; };
|
||||
EB189E8C8B1866196A4DA43B /* about.txt in Resources */ = {isa = PBXBuildFile; fileRef = EB1891FD08E70E9E9DC84AFD /* about.txt */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
@@ -156,6 +159,7 @@
|
||||
62CD1199175E3BD7008C4D0C /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrypto.a; path = "OpenSSL-for-iPhone/lib/libcrypto.a"; sourceTree = "<group>"; };
|
||||
62CD119B175E3E17008C4D0C /* table.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = table.m; sourceTree = "<group>"; };
|
||||
62CD119D175E3E23008C4D0C /* table.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = table.h; sourceTree = "<group>"; };
|
||||
62CD918F178977B500B2CB55 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; };
|
||||
62D00067176EEF66009AC41F /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
|
||||
62D85A4E176DA6FB00FE5575 /* atom.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = atom.c; sourceTree = "<group>"; };
|
||||
62D85A4F176DA6FB00FE5575 /* atom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = atom.h; sourceTree = "<group>"; };
|
||||
@@ -229,11 +233,14 @@
|
||||
62DAB9DF177A11D7003DFFDE /* Crashlytics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Crashlytics.framework; sourceTree = "<group>"; };
|
||||
96D80C04176CE1D7006C8078 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
|
||||
EB1891B68FCBD841C5E461B6 /* About.md */ = {isa = PBXFileReference; lastKnownFileType = file.md; path = About.md; sourceTree = SOURCE_ROOT; };
|
||||
EB1891FD08E70E9E9DC84AFD /* about.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = about.txt; sourceTree = "<group>"; };
|
||||
EB18942F05960F64CC059413 /* SimpleTableViewSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleTableViewSource.h; sourceTree = "<group>"; };
|
||||
EB1895847BCC9ED701A0C8CB /* SWBAboutController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWBAboutController.h; sourceTree = "<group>"; };
|
||||
EB1896EFEA137F75386005D4 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = SOURCE_ROOT; };
|
||||
EB1897832237B71EF50B3DF4 /* SimpleTableViewSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleTableViewSource.m; sourceTree = "<group>"; };
|
||||
EB1897A8F80969EC7477F89D /* 3gnet_enable.mobileconfig */ = {isa = PBXFileReference; lastKnownFileType = file.mobileconfig; path = 3gnet_enable.mobileconfig; sourceTree = "<group>"; };
|
||||
EB1897AD03717EB5E44BA24B /* 3gnet_disable.mobileconfig */ = {isa = PBXFileReference; lastKnownFileType = file.mobileconfig; path = 3gnet_disable.mobileconfig; sourceTree = "<group>"; };
|
||||
EB189EE1CF6E8C6C431B87BA /* SWBAboutController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SWBAboutController.m; sourceTree = "<group>"; };
|
||||
EB189F12BEB086705288D293 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = file.md; path = README.md; sourceTree = SOURCE_ROOT; };
|
||||
EB189F29205BA2AB998B867D /* polipo_disable.config */ = {isa = PBXFileReference; lastKnownFileType = file.config; path = polipo_disable.config; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
@@ -243,6 +250,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
62CD9190178977B500B2CB55 /* MessageUI.framework in Frameworks */,
|
||||
621FCC091760400800411E5F /* CFNetwork.framework in Frameworks */,
|
||||
621FCC071760400400411E5F /* MobileCoreServices.framework in Frameworks */,
|
||||
96D80C05176CE1D7006C8078 /* AVFoundation.framework in Frameworks */,
|
||||
@@ -268,6 +276,7 @@
|
||||
621571AE16CF6BCB003D96B4 /* ShadowWeb */,
|
||||
621571A716CF6BCB003D96B4 /* Frameworks */,
|
||||
621571A616CF6BCB003D96B4 /* Products */,
|
||||
EB1891FD08E70E9E9DC84AFD /* about.txt */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@@ -282,6 +291,7 @@
|
||||
621571A716CF6BCB003D96B4 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
62CD918F178977B500B2CB55 /* MessageUI.framework */,
|
||||
62DAB9DF177A11D7003DFFDE /* Crashlytics.framework */,
|
||||
621FCC081760400800411E5F /* CFNetwork.framework */,
|
||||
621FCC061760400400411E5F /* MobileCoreServices.framework */,
|
||||
@@ -314,6 +324,8 @@
|
||||
621571C016CF6BCB003D96B4 /* SWBViewController.h */,
|
||||
621571C116CF6BCB003D96B4 /* SWBViewController.m */,
|
||||
621571AF16CF6BCB003D96B4 /* Supporting Files */,
|
||||
EB189EE1CF6E8C6C431B87BA /* SWBAboutController.m */,
|
||||
EB1895847BCC9ED701A0C8CB /* SWBAboutController.h */,
|
||||
);
|
||||
path = ShadowWeb;
|
||||
sourceTree = "<group>";
|
||||
@@ -602,6 +614,7 @@
|
||||
62DAB9D61779DAAF003DFFDE /* icon114.png in Resources */,
|
||||
62DAB9D81779DAB5003DFFDE /* icon72.png in Resources */,
|
||||
62DAB9DA1779DAB8003DFFDE /* icon144.png in Resources */,
|
||||
EB189E8C8B1866196A4DA43B /* about.txt in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -681,6 +694,7 @@
|
||||
62D85AAF176DA6FC00FE5575 /* socks.c in Sources */,
|
||||
62D85AB0176DA6FC00FE5575 /* tunnel.c in Sources */,
|
||||
62D85AB1176DA6FC00FE5575 /* util.c in Sources */,
|
||||
EB189E4CAA0DEF020070DC84 /* SWBAboutController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user