├── _config.yml ├── ShadowsocksX-NG ├── privoxy ├── http.png ├── ss-local ├── kcptun_1.png ├── command-512.png ├── kcptun_client ├── libev.4.dylib ├── libpcre.1.dylib ├── libudns.0.dylib ├── menu_g_icon.png ├── menu_icon.png ├── menu_m_icon.png ├── menu_p_icon.png ├── Assets.xcassets │ ├── Contents.json │ └── AppIcon.appiconset │ │ ├── Icon_16x16.png │ │ ├── Icon_32x32.png │ │ ├── Icon_128x128.png │ │ ├── Icon_16x16@2x.png │ │ ├── Icon_256x256.png │ │ ├── Icon_32x32@2x.png │ │ ├── Icon_512x512.png │ │ ├── Icon_128x128@2x.png │ │ ├── Icon_256x256@2x.png │ │ ├── Icon_512x512@2x.png │ │ └── Contents.json ├── libcares.2.dylib ├── menu_icon@2x.png ├── libsodium.23.dylib ├── menu_g_icon@2x.png ├── menu_m_icon@2x.png ├── menu_p_icon@2x.png ├── user-rule.txt ├── menu_icon_disabled.png ├── simple-obfs │ ├── obfs-local │ └── install_simple_obfs.sh ├── icons8-Eye Filled-50.png ├── libmbedcrypto.2.4.2.dylib ├── libmbedcrypto.2.8.0.dylib ├── menu_icon_disabled@2x.png ├── virtual-server-icon-3.png ├── icons8-Blind Filled-50.png ├── SWBApplication.h ├── fix_dir_owner.sh ├── Utils.h ├── stop_privoxy.sh ├── ProxyConfTool.h ├── stop_kcptun.sh ├── stop_ss_local.sh ├── ShortcutsController.h ├── zh-Hans.lproj │ ├── UserRulesController.strings │ ├── Localizable.strings │ └── PreferencesWindowController.strings ├── proxy_conf_helper_version.h ├── ShadowsocksX-NG-Bridging-Header.h ├── start_privoxy.sh ├── start_ss_local.sh ├── start_kcptun.sh ├── privoxy.config.example ├── ProxyConfHelper.h ├── install_helper.sh ├── SWBQRCodeWindowController.h ├── install_privoxy.sh ├── install_kcptun.sh ├── Notifications.swift ├── Utils.swift ├── ShortcutsController.m ├── example-gui-config.json ├── install_ss_local.sh ├── PreferencesWinController.swift ├── Base.lproj │ └── Localizable.strings ├── LaunchAtLoginController.h ├── en.lproj │ └── PreferencesWindowController.strings ├── Info.plist ├── UserRulesController.swift ├── SWBApplication.m └── ProxyConfTool.m ├── Pods ├── Headers │ ├── Private │ │ └── BRLOptionParser │ │ │ └── BRLOptionParser.h │ └── Public │ │ └── BRLOptionParser │ │ └── BRLOptionParser.h ├── MASShortcut │ ├── Framework │ │ ├── MASShortcut.modulemap │ │ ├── Shortcut.h │ │ ├── MASHotKey.h │ │ ├── MASLocalization.h │ │ ├── MASDictionaryTransformer.h │ │ ├── MASShortcutMonitor.h │ │ ├── MASKeyMasks.h │ │ ├── MASShortcutView.h │ │ ├── MASShortcutView+Bindings.h │ │ ├── MASHotKey.m │ │ ├── MASShortcutValidator.h │ │ ├── MASKeyCodes.h │ │ ├── MASDictionaryTransformer.m │ │ ├── MASShortcutView+Bindings.m │ │ └── MASLocalization.m │ ├── LICENSE │ ├── zh-Hans.lproj │ │ └── Localizable.strings │ ├── zh-Hant.lproj │ │ └── Localizable.strings │ ├── ko.lproj │ │ └── Localizable.strings │ └── ja.lproj │ │ └── Localizable.strings ├── Target Support Files │ ├── RxCocoa │ │ ├── RxCocoa.modulemap │ │ ├── RxCocoa-dummy.m │ │ ├── RxCocoa-prefix.pch │ │ ├── RxCocoa-umbrella.h │ │ ├── RxCocoa.xcconfig │ │ └── Info.plist │ ├── RxSwift │ │ ├── RxSwift.modulemap │ │ ├── RxSwift-dummy.m │ │ ├── RxSwift-prefix.pch │ │ ├── RxSwift-umbrella.h │ │ ├── RxSwift.xcconfig │ │ └── Info.plist │ ├── Alamofire │ │ ├── Alamofire.modulemap │ │ ├── Alamofire-dummy.m │ │ ├── Alamofire-prefix.pch │ │ ├── Alamofire-umbrella.h │ │ ├── Alamofire.xcconfig │ │ └── Info.plist │ ├── MASShortcut │ │ ├── MASShortcut.modulemap │ │ ├── MASShortcut-dummy.m │ │ ├── MASShortcut-prefix.pch │ │ ├── MASShortcut.xcconfig │ │ ├── MASShortcut-umbrella.h │ │ ├── ResourceBundle-MASShortcut-Info.plist │ │ └── Info.plist │ ├── GCDWebServer │ │ ├── GCDWebServer.modulemap │ │ ├── GCDWebServer-dummy.m │ │ ├── GCDWebServer-prefix.pch │ │ ├── GCDWebServer.xcconfig │ │ ├── Info.plist │ │ └── GCDWebServer-umbrella.h │ ├── BRLOptionParser │ │ ├── BRLOptionParser-dummy.m │ │ ├── BRLOptionParser-prefix.pch │ │ └── BRLOptionParser.xcconfig │ ├── Pods-ShadowsocksX-NG │ │ ├── Pods-ShadowsocksX-NG.modulemap │ │ ├── Pods-ShadowsocksX-NG-dummy.m │ │ ├── Pods-ShadowsocksX-NG-umbrella.h │ │ ├── Info.plist │ │ ├── Pods-ShadowsocksX-NG.debug.xcconfig │ │ └── Pods-ShadowsocksX-NG.release.xcconfig │ ├── Pods-ShadowsocksX-NGTests │ │ ├── Pods-ShadowsocksX-NGTests-acknowledgements.markdown │ │ ├── Pods-ShadowsocksX-NGTests.modulemap │ │ ├── Pods-ShadowsocksX-NGTests-dummy.m │ │ ├── Pods-ShadowsocksX-NGTests-umbrella.h │ │ ├── Info.plist │ │ ├── Pods-ShadowsocksX-NGTests-acknowledgements.plist │ │ ├── Pods-ShadowsocksX-NGTests.debug.xcconfig │ │ └── Pods-ShadowsocksX-NGTests.release.xcconfig │ └── Pods-proxy_conf_helper │ │ ├── Pods-proxy_conf_helper-dummy.m │ │ ├── Pods-proxy_conf_helper.debug.xcconfig │ │ ├── Pods-proxy_conf_helper.release.xcconfig │ │ └── Pods-proxy_conf_helper-acknowledgements.markdown ├── RxCocoa │ ├── RxCocoa │ │ ├── Runtime │ │ │ ├── _RX.m │ │ │ ├── include │ │ │ │ ├── RxCocoaRuntime.h │ │ │ │ ├── _RXDelegateProxy.h │ │ │ │ └── _RXKVOObserver.h │ │ │ └── _RXKVOObserver.m │ │ ├── RxCocoa.h │ │ ├── Traits │ │ │ ├── Driver │ │ │ │ ├── Variable+Driver.swift │ │ │ │ ├── ControlEvent+Driver.swift │ │ │ │ └── ControlProperty+Driver.swift │ │ │ └── SharedSequence │ │ │ │ └── Variable+SharedSequence.swift │ │ ├── Foundation │ │ │ ├── Logging.swift │ │ │ ├── KVORepresentable.swift │ │ │ ├── NotificationCenter+Rx.swift │ │ │ ├── NSObject+Rx+KVORepresentable.swift │ │ │ ├── NSObject+Rx+RawRepresentable.swift │ │ │ └── KVORepresentable+CoreGraphics.swift │ │ ├── Common │ │ │ ├── SectionedViewDataSourceType.swift │ │ │ ├── RxTarget.swift │ │ │ └── NSLayoutConstraint+Rx.swift │ │ └── macOS │ │ │ ├── NSSlider+Rx.swift │ │ │ ├── NSButton+Rx.swift │ │ │ ├── NSView+Rx.swift │ │ │ └── NSImageView+Rx.swift │ ├── Platform │ │ ├── DispatchQueue+Extensions.swift │ │ ├── DataStructures │ │ │ └── InfiniteSequence.swift │ │ └── RecursiveLock.swift │ └── LICENSE.md ├── RxSwift │ ├── RxSwift │ │ ├── Disposable.swift │ │ ├── Schedulers │ │ │ ├── Internal │ │ │ │ ├── ScheduledItemType.swift │ │ │ │ ├── InvocableType.swift │ │ │ │ ├── AnonymousInvocable.swift │ │ │ │ ├── InvocableScheduledItem.swift │ │ │ │ └── ScheduledItem.swift │ │ │ ├── HistoricalScheduler.swift │ │ │ ├── ImmediateScheduler.swift │ │ │ └── OperationQueueScheduler.swift │ │ ├── Disposables │ │ │ ├── Disposables.swift │ │ │ ├── DisposeBase.swift │ │ │ ├── SubscriptionDisposable.swift │ │ │ ├── NopDisposable.swift │ │ │ ├── BooleanDisposable.swift │ │ │ ├── ScheduledDisposable.swift │ │ │ └── BinaryDisposable.swift │ │ ├── Cancelable.swift │ │ ├── Concurrency │ │ │ ├── SynchronizedUnsubscribeType.swift │ │ │ ├── LockOwnerType.swift │ │ │ ├── SynchronizedDisposeType.swift │ │ │ ├── SynchronizedOnType.swift │ │ │ ├── SynchronizedSubscribeType.swift │ │ │ └── Lock.swift │ │ ├── ObservableConvertibleType.swift │ │ ├── Extensions │ │ │ ├── String+Rx.swift │ │ │ └── Bag+Rx.swift │ │ ├── RxMutableBox.swift │ │ ├── Subjects │ │ │ └── SubjectType.swift │ │ ├── ConnectableObservableType.swift │ │ ├── Observers │ │ │ ├── AnonymousObserver.swift │ │ │ └── ObserverBase.swift │ │ ├── Observables │ │ │ ├── Never.swift │ │ │ ├── Empty.swift │ │ │ ├── Error.swift │ │ │ ├── StartWith.swift │ │ │ ├── AddRef.swift │ │ │ ├── AsMaybe.swift │ │ │ ├── AsSingle.swift │ │ │ ├── Materialize.swift │ │ │ ├── Dematerialize.swift │ │ │ └── Sink.swift │ │ ├── Observable.swift │ │ ├── ObserverType.swift │ │ ├── GroupedObservable.swift │ │ ├── ImmediateSchedulerType.swift │ │ ├── Errors.swift │ │ ├── ObservableType.swift │ │ └── Reactive.swift │ ├── Platform │ │ ├── DispatchQueue+Extensions.swift │ │ ├── DataStructures │ │ │ └── InfiniteSequence.swift │ │ └── RecursiveLock.swift │ └── LICENSE.md ├── Manifest.lock ├── Alamofire │ └── LICENSE ├── BRLOptionParser │ └── LICENSE └── GCDWebServer │ └── LICENSE ├── ShadowsocksX-NG.xcodeproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── .travis.yml ├── LaunchHelper └── LaunchHelper │ ├── AppDelegate.h │ ├── main.m │ ├── Base.lproj │ └── MainMenu.xib │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Info.plist │ └── AppDelegate.m ├── ShadowsocksX-NG.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── WorkspaceSettings.xcsettings ├── .github └── ISSUE_TEMPLATE │ ├── Feature_request.md │ └── Bug_report.md ├── Podfile ├── ShadowsocksX-NGTests ├── Info.plist └── ShadowsocksX_NGTests.swift ├── ISSUE_TEMPLATE.md ├── Podfile.lock └── .gitignore /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-slate -------------------------------------------------------------------------------- /ShadowsocksX-NG/privoxy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/privoxy -------------------------------------------------------------------------------- /Pods/Headers/Private/BRLOptionParser/BRLOptionParser.h: -------------------------------------------------------------------------------- 1 | ../../../BRLOptionParser/BRLOptionParser/BRLOptionParser.h -------------------------------------------------------------------------------- /Pods/Headers/Public/BRLOptionParser/BRLOptionParser.h: -------------------------------------------------------------------------------- 1 | ../../../BRLOptionParser/BRLOptionParser/BRLOptionParser.h -------------------------------------------------------------------------------- /ShadowsocksX-NG/http.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/http.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/ss-local: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/ss-local -------------------------------------------------------------------------------- /ShadowsocksX-NG/kcptun_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/kcptun_1.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/command-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/command-512.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/kcptun_client: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/kcptun_client -------------------------------------------------------------------------------- /ShadowsocksX-NG/libev.4.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/libev.4.dylib -------------------------------------------------------------------------------- /ShadowsocksX-NG/libpcre.1.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/libpcre.1.dylib -------------------------------------------------------------------------------- /ShadowsocksX-NG/libudns.0.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/libudns.0.dylib -------------------------------------------------------------------------------- /ShadowsocksX-NG/menu_g_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/menu_g_icon.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/menu_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/menu_icon.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/menu_m_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/menu_m_icon.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/menu_p_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/menu_p_icon.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ShadowsocksX-NG/libcares.2.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/libcares.2.dylib -------------------------------------------------------------------------------- /ShadowsocksX-NG/menu_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/menu_icon@2x.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/libsodium.23.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/libsodium.23.dylib -------------------------------------------------------------------------------- /ShadowsocksX-NG/menu_g_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/menu_g_icon@2x.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/menu_m_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/menu_m_icon@2x.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/menu_p_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/menu_p_icon@2x.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/user-rule.txt: -------------------------------------------------------------------------------- 1 | ! Put user rules line by line in this file. 2 | ! See https://adblockplus.org/en/filter-cheatsheet 3 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/menu_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/menu_icon_disabled.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/simple-obfs/obfs-local: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/simple-obfs/obfs-local -------------------------------------------------------------------------------- /ShadowsocksX-NG/icons8-Eye Filled-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/icons8-Eye Filled-50.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/libmbedcrypto.2.4.2.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/libmbedcrypto.2.4.2.dylib -------------------------------------------------------------------------------- /ShadowsocksX-NG/libmbedcrypto.2.8.0.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/libmbedcrypto.2.8.0.dylib -------------------------------------------------------------------------------- /ShadowsocksX-NG/menu_icon_disabled@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/menu_icon_disabled@2x.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/virtual-server-icon-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/virtual-server-icon-3.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/icons8-Blind Filled-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/icons8-Blind Filled-50.png -------------------------------------------------------------------------------- /Pods/MASShortcut/Framework/MASShortcut.modulemap: -------------------------------------------------------------------------------- 1 | framework module MASShortcut { 2 | umbrella header "Shortcut.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RxCocoa/RxCocoa.modulemap: -------------------------------------------------------------------------------- 1 | framework module RxCocoa { 2 | umbrella header "RxCocoa-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RxSwift/RxSwift.modulemap: -------------------------------------------------------------------------------- 1 | framework module RxSwift { 2 | umbrella header "RxSwift-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Alamofire/Alamofire.modulemap: -------------------------------------------------------------------------------- 1 | framework module Alamofire { 2 | umbrella header "Alamofire-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RxCocoa/RxCocoa-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_RxCocoa : NSObject 3 | @end 4 | @implementation PodsDummy_RxCocoa 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RxSwift/RxSwift-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_RxSwift : NSObject 3 | @end 4 | @implementation PodsDummy_RxSwift 5 | @end 6 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/Assets.xcassets/AppIcon.appiconset/Icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/Assets.xcassets/AppIcon.appiconset/Icon_16x16.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/Assets.xcassets/AppIcon.appiconset/Icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/Assets.xcassets/AppIcon.appiconset/Icon_32x32.png -------------------------------------------------------------------------------- /Pods/Target Support Files/Alamofire/Alamofire-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Alamofire : NSObject 3 | @end 4 | @implementation PodsDummy_Alamofire 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/MASShortcut/MASShortcut.modulemap: -------------------------------------------------------------------------------- 1 | framework module MASShortcut { 2 | umbrella header "MASShortcut-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/Assets.xcassets/AppIcon.appiconset/Icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/Assets.xcassets/AppIcon.appiconset/Icon_128x128.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/Assets.xcassets/AppIcon.appiconset/Icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/Assets.xcassets/AppIcon.appiconset/Icon_16x16@2x.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/Assets.xcassets/AppIcon.appiconset/Icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/Assets.xcassets/AppIcon.appiconset/Icon_256x256.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/Assets.xcassets/AppIcon.appiconset/Icon_32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/Assets.xcassets/AppIcon.appiconset/Icon_32x32@2x.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/Assets.xcassets/AppIcon.appiconset/Icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/Assets.xcassets/AppIcon.appiconset/Icon_512x512.png -------------------------------------------------------------------------------- /Pods/Target Support Files/GCDWebServer/GCDWebServer.modulemap: -------------------------------------------------------------------------------- 1 | framework module GCDWebServer { 2 | umbrella header "GCDWebServer-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/MASShortcut/MASShortcut-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_MASShortcut : NSObject 3 | @end 4 | @implementation PodsDummy_MASShortcut 5 | @end 6 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/Assets.xcassets/AppIcon.appiconset/Icon_128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/Assets.xcassets/AppIcon.appiconset/Icon_128x128@2x.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/Assets.xcassets/AppIcon.appiconset/Icon_256x256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/Assets.xcassets/AppIcon.appiconset/Icon_256x256@2x.png -------------------------------------------------------------------------------- /ShadowsocksX-NG/Assets.xcassets/AppIcon.appiconset/Icon_512x512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushiao/ShadowsocksX-NG/develop/ShadowsocksX-NG/Assets.xcassets/AppIcon.appiconset/Icon_512x512@2x.png -------------------------------------------------------------------------------- /Pods/Target Support Files/GCDWebServer/GCDWebServer-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_GCDWebServer : NSObject 3 | @end 4 | @implementation PodsDummy_GCDWebServer 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/BRLOptionParser/BRLOptionParser-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_BRLOptionParser : NSObject 3 | @end 4 | @implementation PodsDummy_BRLOptionParser 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ShadowsocksX-NG/Pods-ShadowsocksX-NG.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_ShadowsocksX_NG { 2 | umbrella header "Pods-ShadowsocksX-NG-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ShadowsocksX-NG/Pods-ShadowsocksX-NG-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_ShadowsocksX_NG : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_ShadowsocksX_NG 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/Runtime/_RX.m: -------------------------------------------------------------------------------- 1 | // 2 | // _RX.m 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 7/12/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | #import "include/_RX.h" 10 | 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ShadowsocksX-NGTests/Pods-ShadowsocksX-NGTests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-proxy_conf_helper/Pods-proxy_conf_helper-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_proxy_conf_helper : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_proxy_conf_helper 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ShadowsocksX-NGTests/Pods-ShadowsocksX-NGTests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_ShadowsocksX_NGTests { 2 | umbrella header "Pods-ShadowsocksX-NGTests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /ShadowsocksX-NG.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | osx_image: xcode9 3 | xcode_workspace: ShadowsocksX-NG.xcworkspace 4 | xcode_scheme: ShadowsocksX-NG 5 | script: set -o pipefail && xcodebuild test -workspace ShadowsocksX-NG.xcworkspace -scheme ShadowsocksX-NG|xcpretty 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ShadowsocksX-NGTests/Pods-ShadowsocksX-NGTests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_ShadowsocksX_NGTests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_ShadowsocksX_NGTests 5 | @end 6 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/SWBApplication.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by clowwindy on 3/1/14. 3 | // Copyright (c) 2014 clowwindy. All rights reserved. 4 | // 5 | 6 | #import 7 | @import AppKit; 8 | 9 | 10 | @interface SWBApplication : NSApplication 11 | @end -------------------------------------------------------------------------------- /Pods/Target Support Files/RxCocoa/RxCocoa-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RxSwift/RxSwift-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/MASShortcut/Framework/Shortcut.h: -------------------------------------------------------------------------------- 1 | #import "MASKeyMasks.h" 2 | #import "MASShortcut.h" 3 | #import "MASShortcutValidator.h" 4 | #import "MASShortcutMonitor.h" 5 | #import "MASShortcutBinder.h" 6 | #import "MASDictionaryTransformer.h" 7 | #import "MASShortcutView.h" 8 | #import "MASShortcutView+Bindings.h" 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Alamofire/Alamofire-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/GCDWebServer/GCDWebServer-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/MASShortcut/MASShortcut-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/fix_dir_owner.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # fix_dir_owner.sh 4 | # ShadowsocksX-NG 5 | # 6 | # Created by 邱宇舟 on 2017/8/25. 7 | # Copyright © 2017年 qiuyuzhou. All rights reserved. 8 | 9 | 10 | LAUNCH_AGENTS_DIR="$HOME/Library/LaunchAgents" 11 | sudo chown $@ "$HOME/Library/LaunchAgents" 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/BRLOptionParser/BRLOptionParser-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/Utils.h: -------------------------------------------------------------------------------- 1 | // 2 | // QRCodeUtils.h 3 | // ShadowsocksX-NG 4 | // 5 | // Created by 邱宇舟 on 16/6/8. 6 | // Copyright © 2016年 qiuyuzhou. All rights reserved. 7 | // 8 | 9 | #ifndef QRCodeUtils_h 10 | #define QRCodeUtils_h 11 | 12 | void ScanQRCodeOnScreen(); 13 | 14 | #endif /* QRCodeUtils_h */ 15 | -------------------------------------------------------------------------------- /LaunchHelper/LaunchHelper/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // LaunchHelper 4 | // 5 | // Created by 邱宇舟 on 2017/3/28. 6 | // Copyright © 2017年 qiuyuzhou. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : NSObject 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /LaunchHelper/LaunchHelper/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // LaunchHelper 4 | // 5 | // Created by 邱宇舟 on 2017/3/28. 6 | // Copyright © 2017年 qiuyuzhou. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, const char * argv[]) { 12 | return NSApplicationMain(argc, argv); 13 | } 14 | -------------------------------------------------------------------------------- /ShadowsocksX-NG.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/stop_privoxy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # stop_privoxy.sh 4 | # ShadowsocksX-NG 5 | # 6 | # Created by 王晨 on 16/10/7. 7 | # Copyright © 2016年 zhfish. All rights reserved. 8 | 9 | launchctl stop com.qiuyuzhou.shadowsocksX-NG.http 10 | launchctl unload "$HOME/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.http.plist" 11 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/ProxyConfTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // ProxyConfTool.h 3 | // ShadowsocksX-NG 4 | // 5 | // Created by 邱宇舟 on 16/6/29. 6 | // Copyright © 2016年 qiuyuzhou. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface ProxyConfTool : NSObject 13 | 14 | +(NSArray*)networkServicesList; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/stop_kcptun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # stop_kcptun.sh 4 | # ShadowsocksX-NG 5 | # 6 | # Created by 邱宇舟 on 2017/1/11. 7 | # Copyright © 2017年 qiuyuzhou. All rights reserved. 8 | 9 | launchctl stop com.qiuyuzhou.shadowsocksX-NG.kcptun 10 | launchctl unload "$HOME/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.kcptun.plist" 11 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/stop_ss_local.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # stop_ss_local.sh 4 | # ShadowsocksX-NG 5 | # 6 | # Created by 邱宇舟 on 16/6/6. 7 | # Copyright © 2016年 qiuyuzhou. All rights reserved. 8 | 9 | launchctl stop com.qiuyuzhou.shadowsocksX-NG.local 10 | launchctl unload "$HOME/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.local.plist" 11 | -------------------------------------------------------------------------------- /Pods/MASShortcut/Framework/MASHotKey.h: -------------------------------------------------------------------------------- 1 | #import "MASShortcut.h" 2 | 3 | extern FourCharCode const MASHotKeySignature; 4 | 5 | @interface MASHotKey : NSObject 6 | 7 | @property(readonly) UInt32 carbonID; 8 | @property(copy) dispatch_block_t action; 9 | 10 | + (instancetype) registeredHotKeyWithShortcut: (MASShortcut*) shortcut; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Disposable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Disposable.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 2/8/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | /// Respresents a disposable resource. 10 | public protocol Disposable { 11 | /// Dispose resource. 12 | func dispose() 13 | } 14 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/ShortcutsController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ShortcutsController.h 3 | // ShadowsocksX-NG 4 | // 5 | // Created by 邱宇舟 on 2017/3/10. 6 | // Copyright © 2017年 qiuyuzhou. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ShortcutsController : NSObject 12 | 13 | + (void)bindShortcuts; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ScheduledItemType.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 11/7/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | protocol ScheduledItemType 10 | : Cancelable 11 | , InvocableType { 12 | func invoke() 13 | } 14 | -------------------------------------------------------------------------------- /ShadowsocksX-NG.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Disposables/Disposables.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Disposables.swift 3 | // RxSwift 4 | // 5 | // Created by Mohsen Ramezanpoor on 01/08/2016. 6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | /// A collection of utility methods for common disposable operations. 10 | public struct Disposables { 11 | private init() {} 12 | } 13 | 14 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/zh-Hans.lproj/UserRulesController.strings: -------------------------------------------------------------------------------- 1 | 2 | /* Class = "NSButtonCell"; title = "OK"; ObjectID = "0Sc-cm-Vyu"; */ 3 | "0Sc-cm-Vyu.title" = "确定"; 4 | 5 | /* Class = "NSWindow"; title = "User Rules"; ObjectID = "F0z-JX-Cv5"; */ 6 | "F0z-JX-Cv5.title" = "用户规则"; 7 | 8 | /* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "QAR-9i-kmv"; */ 9 | "QAR-9i-kmv.title" = "取消"; 10 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Cancelable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Cancelable.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 3/12/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | /// Represents disposable resource with state tracking. 10 | public protocol Cancelable : Disposable { 11 | /// Was resource disposed. 12 | var isDisposed: Bool { get } 13 | } 14 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/proxy_conf_helper_version.h: -------------------------------------------------------------------------------- 1 | // 2 | // proxy_conf_helper_version.h 3 | // ShadowsocksX-NG 4 | // 5 | // Created by 邱宇舟 on 16/6/10. 6 | // Copyright © 2016年 qiuyuzhou. All rights reserved. 7 | // 8 | 9 | #ifndef proxy_conf_helper_version_h 10 | #define proxy_conf_helper_version_h 11 | 12 | #define kProxyConfHelperVersion @"1.7.0" 13 | 14 | #endif /* proxy_conf_helper_version_h */ 15 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/ShadowsocksX-NG-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import 6 | 7 | #import "LaunchAtLoginController.h" 8 | #import "SWBQRCodeWindowController.h" 9 | #import "ShortcutsController.h" 10 | #import "Utils.h" 11 | #import "ProxyConfHelper.h" 12 | #import "ProxyConfTool.h" 13 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SynchronizedUnsubscribeType.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 10/25/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | protocol SynchronizedUnsubscribeType : class { 10 | associatedtype DisposeKey 11 | 12 | func synchronizedUnsubscribe(_ disposeKey: DisposeKey) 13 | } 14 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InvocableType.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 11/7/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | protocol InvocableType { 10 | func invoke() 11 | } 12 | 13 | protocol InvocableWithValueType { 14 | associatedtype Value 15 | 16 | func invoke(_ value: Value) 17 | } 18 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RxSwift/RxSwift-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double RxSwiftVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char RxSwiftVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/start_privoxy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # start_privoxy.sh 4 | # ShadowsocksX-NG 5 | # 6 | # Created by 王晨 on 16/10/7. 7 | # Copyright © 2016年 zhfish. All rights reserved. 8 | 9 | chmod 644 "$HOME/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.http.plist" 10 | launchctl load -wF "$HOME/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.http.plist" 11 | launchctl start com.qiuyuzhou.shadowsocksX-NG.http 12 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Alamofire/Alamofire-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double AlamofireVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char AlamofireVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/start_ss_local.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # start_ss_local.sh 4 | # ShadowsocksX-NG 5 | # 6 | # Created by 邱宇舟 on 16/6/6. 7 | # Copyright © 2016年 qiuyuzhou. All rights reserved. 8 | 9 | chmod 644 "$HOME/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.local.plist" 10 | launchctl load -wF "$HOME/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.local.plist" 11 | launchctl start com.qiuyuzhou.shadowsocksX-NG.local 12 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/start_kcptun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # start_kcptun.sh 4 | # ShadowsocksX-NG 5 | # 6 | # Created by 邱宇舟 on 2017/1/11. 7 | # Copyright © 2017年 qiuyuzhou. All rights reserved. 8 | 9 | chmod 644 "$HOME/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.kcptun.plist" 10 | launchctl load -wF "$HOME/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.kcptun.plist" 11 | launchctl start com.qiuyuzhou.shadowsocksX-NG.kcptun 12 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ShadowsocksX-NG/Pods-ShadowsocksX-NG-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_ShadowsocksX_NGVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_ShadowsocksX_NGVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/simple-obfs/install_simple_obfs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | FILE_DIR=`dirname "${BASH_SOURCE[0]}"` 4 | cd "$FILE_DIR" 5 | 6 | NGDir="$HOME/Library/Application Support/ShadowsocksX-NG" 7 | TargetDir="$NGDir/simple-obfs-0.0.2" 8 | PluginDir="$NGDir/plugins" 9 | 10 | echo ngdir: ${NGDir} 11 | 12 | mkdir -p "$TargetDir" 13 | mkdir -p "$PluginDir" 14 | 15 | cp -f obfs-local "$TargetDir" 16 | 17 | ln -sfh "$TargetDir/obfs-local" "$PluginDir" 18 | 19 | echo done 20 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LockOwnerType.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 10/25/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | protocol LockOwnerType : class, Lock { 10 | var _lock: RecursiveLock { get } 11 | } 12 | 13 | extension LockOwnerType { 14 | func lock() { 15 | _lock.lock() 16 | } 17 | 18 | func unlock() { 19 | _lock.unlock() 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Schedulers/Internal/AnonymousInvocable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AnonymousInvocable.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 11/7/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | struct AnonymousInvocable : InvocableType { 10 | private let _action: () -> () 11 | 12 | init(_ action: @escaping () -> ()) { 13 | _action = action 14 | } 15 | 16 | func invoke() { 17 | _action() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ShadowsocksX-NGTests/Pods-ShadowsocksX-NGTests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_ShadowsocksX_NGTestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_ShadowsocksX_NGTestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DisposeBase.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 4/4/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | /// Base class for all disposables. 10 | public class DisposeBase { 11 | init() { 12 | #if TRACE_RESOURCES 13 | let _ = Resources.incrementTotal() 14 | #endif 15 | } 16 | 17 | deinit { 18 | #if TRACE_RESOURCES 19 | let _ = Resources.decrementTotal() 20 | #endif 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SynchronizedDisposeType.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 10/25/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | protocol SynchronizedDisposeType : class, Disposable, Lock { 10 | func _synchronized_dispose() 11 | } 12 | 13 | extension SynchronizedDisposeType { 14 | func synchronizedDispose() { 15 | lock(); defer { unlock() } 16 | _synchronized_dispose() 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/privoxy.config.example: -------------------------------------------------------------------------------- 1 | listen-address {http} 2 | toggle 1 3 | enable-remote-toggle 1 4 | enable-remote-http-toggle 1 5 | enable-edit-actions 0 6 | enforce-blocks 0 7 | buffer-limit 4096 8 | forwarded-connect-retries 0 9 | accept-intercepted-requests 0 10 | allow-cgi-request-crunching 0 11 | split-large-forms 0 12 | keep-alive-timeout 5 13 | socket-timeout 60 14 | 15 | forward-socks5 / {socks5} . 16 | forward 192.168.*.*/ . 17 | forward 10.*.*.*/ . 18 | forward 127.*.*.*/ . 19 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SynchronizedOnType.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 10/25/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | protocol SynchronizedOnType : class, ObserverType, Lock { 10 | func _synchronized_on(_ event: Event) 11 | } 12 | 13 | extension SynchronizedOnType { 14 | func synchronizedOn(_ event: Event) { 15 | lock(); defer { unlock() } 16 | _synchronized_on(event) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/RxCocoa.h: -------------------------------------------------------------------------------- 1 | // 2 | // RxCocoa.h 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 2/21/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "_RX.h" 11 | #import "_RXDelegateProxy.h" 12 | #import "_RXKVOObserver.h" 13 | #import "_RXObjCRuntime.h" 14 | 15 | //! Project version number for RxCocoa. 16 | FOUNDATION_EXPORT double RxCocoaVersionNumber; 17 | 18 | //! Project version string for RxCocoa. 19 | FOUNDATION_EXPORT const unsigned char RxCocoaVersionString[]; -------------------------------------------------------------------------------- /ShadowsocksX-NG/ProxyConfHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // ProxyConfHelper.h 3 | // ShadowsocksX-NG 4 | // 5 | // Created by 邱宇舟 on 16/6/10. 6 | // Copyright © 2016年 qiuyuzhou. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | @interface ProxyConfHelper : NSObject 14 | 15 | + (void)install; 16 | 17 | + (void)enablePACProxy; 18 | 19 | + (void)enableGlobalProxy; 20 | 21 | + (void)disableProxy; 22 | 23 | + (void)startMonitorPAC; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/Runtime/include/RxCocoaRuntime.h: -------------------------------------------------------------------------------- 1 | // 2 | // RxCocoaRuntime.h 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 2/21/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "_RX.h" 11 | #import "_RXDelegateProxy.h" 12 | #import "_RXKVOObserver.h" 13 | #import "_RXObjCRuntime.h" 14 | 15 | //! Project version number for RxCocoa. 16 | FOUNDATION_EXPORT double RxCocoaVersionNumber; 17 | 18 | //! Project version string for RxCocoa. 19 | FOUNDATION_EXPORT const unsigned char RxCocoaVersionString[]; 20 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RxCocoa/RxCocoa-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "RxCocoa.h" 14 | #import "RxCocoaRuntime.h" 15 | #import "_RX.h" 16 | #import "_RXDelegateProxy.h" 17 | #import "_RXKVOObserver.h" 18 | #import "_RXObjCRuntime.h" 19 | 20 | FOUNDATION_EXPORT double RxCocoaVersionNumber; 21 | FOUNDATION_EXPORT const unsigned char RxCocoaVersionString[]; 22 | 23 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/install_helper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # install_helper.sh 4 | # shadowsocks 5 | # 6 | # Created by clowwindy on 14-3-15. 7 | 8 | cd `dirname "${BASH_SOURCE[0]}"` 9 | sudo mkdir -p "/Library/Application Support/ShadowsocksX-NG/" 10 | sudo cp proxy_conf_helper "/Library/Application Support/ShadowsocksX-NG/" 11 | sudo chown root:admin "/Library/Application Support/ShadowsocksX-NG/proxy_conf_helper" 12 | sudo chmod a+rx "/Library/Application Support/ShadowsocksX-NG/proxy_conf_helper" 13 | sudo chmod +s "/Library/Application Support/ShadowsocksX-NG/proxy_conf_helper" 14 | 15 | echo done 16 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InvocableScheduledItem.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 11/7/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | struct InvocableScheduledItem : InvocableType { 10 | 11 | let _invocable: I 12 | let _state: I.Value 13 | 14 | init(invocable: I, state: I.Value) { 15 | _invocable = invocable 16 | _state = state 17 | } 18 | 19 | func invoke() { 20 | _invocable.invoke(_state) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SubscriptionDisposable.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 10/25/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | struct SubscriptionDisposable : Disposable { 10 | private let _key: T.DisposeKey 11 | private weak var _owner: T? 12 | 13 | init(owner: T, key: T.DisposeKey) { 14 | _owner = owner 15 | _key = key 16 | } 17 | 18 | func dispose() { 19 | _owner?.synchronizedUnsubscribe(_key) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/ObservableConvertibleType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ObservableConvertibleType.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 9/17/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | /// Type that can be converted to observable sequence (`Observable`). 10 | public protocol ObservableConvertibleType { 11 | /// Type of elements in sequence. 12 | associatedtype E 13 | 14 | /// Converts `self` to `Observable` sequence. 15 | /// 16 | /// - returns: Observable sequence that represents `self`. 17 | func asObservable() -> Observable 18 | } 19 | -------------------------------------------------------------------------------- /Pods/RxCocoa/Platform/DispatchQueue+Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DispatchQueue+Extensions.swift 3 | // Platform 4 | // 5 | // Created by Krunoslav Zaher on 10/22/16. 6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | import Dispatch 10 | 11 | extension DispatchQueue { 12 | private static var token: DispatchSpecificKey<()> = { 13 | let key = DispatchSpecificKey<()>() 14 | DispatchQueue.main.setSpecific(key: key, value: ()) 15 | return key 16 | }() 17 | 18 | static var isMain: Bool { 19 | return DispatchQueue.getSpecific(key: token) != nil 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Pods/RxSwift/Platform/DispatchQueue+Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DispatchQueue+Extensions.swift 3 | // Platform 4 | // 5 | // Created by Krunoslav Zaher on 10/22/16. 6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | import Dispatch 10 | 11 | extension DispatchQueue { 12 | private static var token: DispatchSpecificKey<()> = { 13 | let key = DispatchSpecificKey<()>() 14 | DispatchQueue.main.setSpecific(key: key, value: ()) 15 | return key 16 | }() 17 | 18 | static var isMain: Bool { 19 | return DispatchQueue.getSpecific(key: token) != nil 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/Traits/Driver/Variable+Driver.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Variable+Driver.swift 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 12/28/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | #if !RX_NO_MODULE 10 | import RxSwift 11 | #endif 12 | 13 | extension Variable { 14 | /// Converts `Variable` to `Driver` unit. 15 | /// 16 | /// - returns: Driving observable sequence. 17 | public func asDriver() -> Driver { 18 | let source = self.asObservable() 19 | .observeOn(DriverSharingStrategy.scheduler) 20 | return Driver(source) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/Foundation/Logging.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Logging.swift 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 4/3/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | import struct Foundation.URLRequest 10 | 11 | /// Simple logging settings for RxCocoa library. 12 | public struct Logging { 13 | public typealias LogURLRequest = (URLRequest) -> Bool 14 | 15 | /// Log URL requests to standard output in curl format. 16 | public static var URLRequests: LogURLRequest = { _ in 17 | #if DEBUG 18 | return true 19 | #else 20 | return false 21 | #endif 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Pods/MASShortcut/Framework/MASLocalization.h: -------------------------------------------------------------------------------- 1 | /** 2 | Reads a localized string from the framework’s bundle. 3 | 4 | Normally you would use NSLocalizedString to read the localized 5 | strings, but that’s just a shortcut for loading the strings from 6 | the main bundle. And once the framework ends up in an app, the 7 | main bundle will be the app’s bundle and won’t contain our strings. 8 | So we introduced this helper function that makes sure to load the 9 | strings from the framework’s bundle. Please avoid using 10 | NSLocalizedString throughout the framework, it wouldn’t work 11 | properly. 12 | */ 13 | NSString *MASLocalizedString(NSString *key, NSString *comment); -------------------------------------------------------------------------------- /Pods/Target Support Files/BRLOptionParser/BRLOptionParser.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/BRLOptionParser 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/BRLOptionParser" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BRLOptionParser" 4 | PODS_BUILD_DIR = $BUILD_DIR 5 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/BRLOptionParser 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | 10 | **Describe the solution you'd like** 11 | A clear and concise description of what you want to happen. 12 | 13 | **Describe alternatives you've considered** 14 | A clear and concise description of any alternative solutions or features you've considered. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Concurrency/SynchronizedSubscribeType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SynchronizedSubscribeType.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 10/25/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | protocol SynchronizedSubscribeType : class, ObservableType, Lock { 10 | func _synchronized_subscribe(_ observer: O) -> Disposable where O.E == E 11 | } 12 | 13 | extension SynchronizedSubscribeType { 14 | func synchronizedSubscribe(_ observer: O) -> Disposable where O.E == E { 15 | lock(); defer { unlock() } 16 | return _synchronized_subscribe(observer) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RxSwift/RxSwift.xcconfig: -------------------------------------------------------------------------------- 1 | CODE_SIGN_IDENTITY = 2 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/RxSwift 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BRLOptionParser" 5 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/RxSwift 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Alamofire/Alamofire.xcconfig: -------------------------------------------------------------------------------- 1 | CODE_SIGN_IDENTITY = 2 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Alamofire 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BRLOptionParser" 5 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Alamofire 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/SWBQRCodeWindowController.h: -------------------------------------------------------------------------------- 1 | // 2 | // QRCodeWindowController.h 3 | // shadowsocks 4 | // 5 | // Created by clowwindy on 10/12/14. 6 | // Copyright (c) 2014 clowwindy. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface SWBQRCodeWindowController : NSWindowController 13 | 14 | @property (nonatomic, copy) NSString *legacyQRCode; 15 | @property (nonatomic, copy) NSString *qrCode; 16 | @property (nonatomic, copy) NSString *title; 17 | 18 | @property (nonatomic, weak) NSTextField *titleTextField; 19 | @property (nonatomic, weak) NSImageView *imageView; 20 | 21 | - (IBAction) copyQRCode: (id) sender; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Extensions/String+Rx.swift: -------------------------------------------------------------------------------- 1 | // 2 | // String+Rx.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 12/25/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | extension String { 10 | /// This is needed because on Linux Swift doesn't have `rangeOfString(..., options: .BackwardsSearch)` 11 | func lastIndexOf(_ character: Character) -> Index? { 12 | var index = endIndex 13 | while index > startIndex { 14 | index = self.index(before: index) 15 | if self[index] == character { 16 | return index 17 | } 18 | } 19 | 20 | return nil 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/install_privoxy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # install_privoxy.sh 4 | # ShadowsocksX-NG 5 | # 6 | # Created by 王晨 on 16/10/7. 7 | # Copyright © 2016年 zhfish. All rights reserved. 8 | 9 | 10 | cd `dirname "${BASH_SOURCE[0]}"` 11 | privoxyVersion=3.0.26.static 12 | mkdir -p "$HOME/Library/Application Support/ShadowsocksX-NG/privoxy-$privoxyVersion" 13 | cp -f privoxy "$HOME/Library/Application Support/ShadowsocksX-NG/privoxy-$privoxyVersion/" 14 | rm -f "$HOME/Library/Application Support/ShadowsocksX-NG/privoxy" 15 | ln -s "$HOME/Library/Application Support/ShadowsocksX-NG/privoxy-$privoxyVersion/privoxy" "$HOME/Library/Application Support/ShadowsocksX-NG/privoxy" 16 | 17 | echo done 18 | -------------------------------------------------------------------------------- /Pods/Target Support Files/MASShortcut/MASShortcut.xcconfig: -------------------------------------------------------------------------------- 1 | CODE_SIGN_IDENTITY = 2 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/MASShortcut 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BRLOptionParser" 5 | OTHER_LDFLAGS = -framework "AppKit" -framework "Carbon" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/MASShortcut 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | -------------------------------------------------------------------------------- /Pods/Target Support Files/GCDWebServer/GCDWebServer.xcconfig: -------------------------------------------------------------------------------- 1 | CODE_SIGN_IDENTITY = 2 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/GCDWebServer 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BRLOptionParser" 5 | OTHER_LDFLAGS = -l"z" -framework "SystemConfiguration" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/GCDWebServer 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/install_kcptun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # install_kcptun.sh 4 | # ShadowsocksX-NG 5 | # 6 | # Created by 邱宇舟 on 2017/1/11. 7 | # Copyright © 2017年 qiuyuzhou. All rights reserved. 8 | 9 | VERSION="20170322" 10 | 11 | cd `dirname "${BASH_SOURCE[0]}"` 12 | 13 | mkdir -p "$HOME/Library/Application Support/ShadowsocksX-NG/kcptun_$VERSION" 14 | cp -f kcptun_client "$HOME/Library/Application Support/ShadowsocksX-NG/kcptun_$VERSION/" 15 | rm -f "$HOME/Library/Application Support/ShadowsocksX-NG/kcptun_client" 16 | ln -s "$HOME/Library/Application Support/ShadowsocksX-NG/kcptun_$VERSION/kcptun_client" "$HOME/Library/Application Support/ShadowsocksX-NG/kcptun_client" 17 | 18 | echo "install kcptun done" 19 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-proxy_conf_helper/Pods-proxy_conf_helper.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BRLOptionParser" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/BRLOptionParser" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/BRLOptionParser" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"BRLOptionParser" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/Notifications.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Notifications.swift 3 | // ShadowsocksX-NG 4 | // 5 | // Created by 邱宇舟 on 16/6/7. 6 | // Copyright © 2016年 qiuyuzhou. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | let NOTIFY_SERVER_PROFILES_CHANGED = Notification.Name(rawValue: "NOTIFY_SERVER_PROFILES_CHANGED") 12 | 13 | let NOTIFY_CONF_CHANGED = Notification.Name(rawValue: "NOTIFY_CONF_CHANGED") 14 | 15 | let NOTIFY_TOGGLE_RUNNING_SHORTCUT = Notification.Name(rawValue: "NOTIFY_TOGGLE_RUNNING_SHORTCUT") 16 | let NOTIFY_SWITCH_PROXY_MODE_SHORTCUT = Notification.Name(rawValue: "NOTIFY_SWITCH_PROXY_MODE_SHORTCUT") 17 | 18 | let NOTIFY_FOUND_SS_URL = Notification.Name(rawValue: "NOTIFY_FOUND_SS_URL") 19 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-proxy_conf_helper/Pods-proxy_conf_helper.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BRLOptionParser" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/BRLOptionParser" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/BRLOptionParser" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"BRLOptionParser" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/RxMutableBox.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RxMutableBox.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 5/22/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | /// Creates mutable reference wrapper for any type. 10 | final class RxMutableBox : CustomDebugStringConvertible { 11 | /// Wrapped value 12 | var value : T 13 | 14 | /// Creates reference wrapper for `value`. 15 | /// 16 | /// - parameter value: Value to wrap. 17 | init (_ value: T) { 18 | self.value = value 19 | } 20 | } 21 | 22 | extension RxMutableBox { 23 | /// - returns: Box description. 24 | var debugDescription: String { 25 | return "MutatingBox(\(self.value))" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RxCocoa/RxCocoa.xcconfig: -------------------------------------------------------------------------------- 1 | CODE_SIGN_IDENTITY = 2 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/RxCocoa 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/RxSwift" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BRLOptionParser" 6 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT} 10 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/RxCocoa 11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 12 | SKIP_INSTALL = YES 13 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Subjects/SubjectType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SubjectType.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 3/1/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | /// Represents an object that is both an observable sequence as well as an observer. 10 | public protocol SubjectType : ObservableType { 11 | /// The type of the observer that represents this subject. 12 | /// 13 | /// Usually this type is type of subject itself, but it doesn't have to be. 14 | associatedtype SubjectObserverType : ObserverType 15 | 16 | /// Returns observer interface for subject. 17 | /// 18 | /// - returns: Observer interface for subject. 19 | func asObserver() -> SubjectObserverType 20 | 21 | } 22 | -------------------------------------------------------------------------------- /Pods/RxCocoa/Platform/DataStructures/InfiniteSequence.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InfiniteSequence.swift 3 | // Platform 4 | // 5 | // Created by Krunoslav Zaher on 6/13/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | /// Sequence that repeats `repeatedValue` infinite number of times. 10 | struct InfiniteSequence : Sequence { 11 | typealias Element = E 12 | typealias Iterator = AnyIterator 13 | 14 | private let _repeatedValue: E 15 | 16 | init(repeatedValue: E) { 17 | _repeatedValue = repeatedValue 18 | } 19 | 20 | func makeIterator() -> Iterator { 21 | let repeatedValue = _repeatedValue 22 | return AnyIterator { 23 | return repeatedValue 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/Common/SectionedViewDataSourceType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SectionedViewDataSourceType.swift 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 1/10/16. 6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | import struct Foundation.IndexPath 10 | 11 | /// Data source with access to underlying sectioned model. 12 | public protocol SectionedViewDataSourceType { 13 | /// Returns model at index path. 14 | /// 15 | /// In case data source doesn't contain any sections when this method is being called, `RxCocoaError.ItemsNotYetBound(object: self)` is thrown. 16 | 17 | /// - parameter indexPath: Model index path 18 | /// - returns: Model at index path. 19 | func model(at indexPath: IndexPath) throws -> Any 20 | } 21 | -------------------------------------------------------------------------------- /Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InfiniteSequence.swift 3 | // Platform 4 | // 5 | // Created by Krunoslav Zaher on 6/13/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | /// Sequence that repeats `repeatedValue` infinite number of times. 10 | struct InfiniteSequence : Sequence { 11 | typealias Element = E 12 | typealias Iterator = AnyIterator 13 | 14 | private let _repeatedValue: E 15 | 16 | init(repeatedValue: E) { 17 | _repeatedValue = repeatedValue 18 | } 19 | 20 | func makeIterator() -> Iterator { 21 | let repeatedValue = _repeatedValue 22 | return AnyIterator { 23 | return repeatedValue 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/Traits/SharedSequence/Variable+SharedSequence.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Variable+SharedSequence.swift 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 12/28/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | #if !RX_NO_MODULE 10 | import RxSwift 11 | #endif 12 | 13 | extension Variable { 14 | /// Converts `Variable` to `SharedSequence` unit. 15 | /// 16 | /// - returns: Observable sequence. 17 | public func asSharedSequence(strategy: SharingStrategy.Type = SharingStrategy.self) -> SharedSequence { 18 | let source = self.asObservable() 19 | .observeOn(SharingStrategy.scheduler) 20 | return SharedSequence(source) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | platform :macos, '10.11' 4 | 5 | target 'ShadowsocksX-NG' do 6 | # Comment this line if you're not using Swift and don't want to use dynamic frameworks 7 | use_frameworks! 8 | 9 | # Pods for ShadowsocksX-NG 10 | pod 'Alamofire', '~> 4.2.0' 11 | pod "GCDWebServer", "~> 3.0" 12 | pod 'MASShortcut', '~> 2' 13 | 14 | # https://github.com/ReactiveX/RxSwift/blob/master/Documentation/GettingStarted.md 15 | pod 'RxSwift', '~> 3.0' 16 | pod 'RxCocoa', '~> 3.0' 17 | 18 | target 'ShadowsocksX-NGTests' do 19 | inherit! :search_paths 20 | # Pods for testing 21 | end 22 | 23 | end 24 | 25 | target 'proxy_conf_helper' do 26 | pod 'BRLOptionParser', '~> 0.3.1' 27 | end 28 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/macOS/NSSlider+Rx.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSSlider+Rx.swift 3 | // RxCocoa 4 | // 5 | // Created by Junior B. on 24/05/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | #if os(macOS) 10 | 11 | #if !RX_NO_MODULE 12 | import RxSwift 13 | #endif 14 | import Cocoa 15 | 16 | extension Reactive where Base: NSSlider { 17 | 18 | /// Reactive wrapper for `value` property. 19 | public var value: ControlProperty { 20 | return NSControl.rx.value( 21 | base, 22 | getter: { control in 23 | return control.doubleValue 24 | }, 25 | setter: { control, value in 26 | control.doubleValue = value 27 | } 28 | ) 29 | } 30 | 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KVORepresentable.swift 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 11/14/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | /// Type that is KVO representable (KVO mechanism can be used to observe it). 10 | public protocol KVORepresentable { 11 | /// Associated KVO type. 12 | associatedtype KVOType 13 | 14 | /// Constructs `Self` using KVO value. 15 | init?(KVOValue: KVOType) 16 | } 17 | 18 | extension KVORepresentable { 19 | /// Initializes `KVORepresentable` with optional value. 20 | init?(KVOValue: KVOType?) { 21 | guard let KVOValue = KVOValue else { 22 | return nil 23 | } 24 | 25 | self.init(KVOValue: KVOValue) 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NopDisposable.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 2/15/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | /// Represents a disposable that does nothing on disposal. 10 | /// 11 | /// Nop = No Operation 12 | fileprivate struct NopDisposable : Disposable { 13 | 14 | fileprivate static let noOp: Disposable = NopDisposable() 15 | 16 | fileprivate init() { 17 | 18 | } 19 | 20 | /// Does nothing. 21 | public func dispose() { 22 | } 23 | } 24 | 25 | extension Disposables { 26 | /** 27 | Creates a disposable that does nothing on disposal. 28 | */ 29 | static public func create() -> Disposable { 30 | return NopDisposable.noOp 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Pods/Target Support Files/MASShortcut/MASShortcut-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "MASDictionaryTransformer.h" 14 | #import "MASHotKey.h" 15 | #import "MASKeyCodes.h" 16 | #import "MASKeyMasks.h" 17 | #import "MASLocalization.h" 18 | #import "MASShortcut.h" 19 | #import "MASShortcutBinder.h" 20 | #import "MASShortcutMonitor.h" 21 | #import "MASShortcutValidator.h" 22 | #import "MASShortcutView+Bindings.h" 23 | #import "MASShortcutView.h" 24 | #import "Shortcut.h" 25 | 26 | FOUNDATION_EXPORT double MASShortcutVersionNumber; 27 | FOUNDATION_EXPORT const unsigned char MASShortcutVersionString[]; 28 | 29 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/Traits/Driver/ControlEvent+Driver.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ControlEvent+Driver.swift 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 9/19/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | #if !RX_NO_MODULE 10 | import RxSwift 11 | #endif 12 | 13 | extension ControlEvent { 14 | /// Converts `ControlEvent` to `Driver` trait. 15 | /// 16 | /// `ControlEvent` already can't fail, so no special case needs to be handled. 17 | public func asDriver() -> Driver { 18 | return self.asDriver { (error) -> Driver in 19 | #if DEBUG 20 | rxFatalError("Somehow driver received error from a source that shouldn't fail.") 21 | #else 22 | return Driver.empty() 23 | #endif 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/Runtime/include/_RXDelegateProxy.h: -------------------------------------------------------------------------------- 1 | // 2 | // _RXDelegateProxy.h 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 7/4/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface _RXDelegateProxy : NSObject 14 | 15 | @property (nonatomic, weak, readonly) id _forwardToDelegate; 16 | 17 | -(void)_setForwardToDelegate:(id __nullable)forwardToDelegate retainDelegate:(BOOL)retainDelegate; 18 | 19 | -(BOOL)hasWiredImplementationForSelector:(SEL)selector; 20 | -(BOOL)voidDelegateMethodsContain:(SEL)selector; 21 | 22 | -(void)_sentMessage:(SEL)selector withArguments:(NSArray*)arguments; 23 | -(void)_methodInvoked:(SEL)selector withArguments:(NSArray*)arguments; 24 | 25 | @end 26 | 27 | NS_ASSUME_NONNULL_END 28 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/Traits/Driver/ControlProperty+Driver.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ControlProperty+Driver.swift 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 9/19/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | #if !RX_NO_MODULE 10 | import RxSwift 11 | #endif 12 | 13 | extension ControlProperty { 14 | /// Converts `ControlProperty` to `Driver` trait. 15 | /// 16 | /// `ControlProperty` already can't fail, so no special case needs to be handled. 17 | public func asDriver() -> Driver { 18 | return self.asDriver { (error) -> Driver in 19 | #if DEBUG 20 | rxFatalError("Somehow driver received error from a source that shouldn't fail.") 21 | #else 22 | return Driver.empty() 23 | #endif 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HistoricalScheduler.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 12/27/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | import struct Foundation.Date 10 | 11 | /// Provides a virtual time scheduler that uses `Date` for absolute time and `NSTimeInterval` for relative time. 12 | public class HistoricalScheduler : VirtualTimeScheduler { 13 | 14 | /** 15 | Creates a new historical scheduler with initial clock value. 16 | 17 | - parameter initialClock: Initial value for virtual clock. 18 | */ 19 | public init(initialClock: RxTime = Date(timeIntervalSince1970: 0)) { 20 | super.init(initialClock: initialClock, converter: HistoricalSchedulerTimeConverter()) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ShadowsocksX-NGTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/ConnectableObservableType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ConnectableObservableType.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 3/1/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | /** 10 | Represents an observable sequence wrapper that can be connected and disconnected from its underlying observable sequence. 11 | */ 12 | public protocol ConnectableObservableType : ObservableType { 13 | /** 14 | Connects the observable wrapper to its source. All subscribed observers will receive values from the underlying observable sequence as long as the connection is established. 15 | 16 | - returns: Disposable used to disconnect the observable wrapper from its source, causing subscribed observer to stop receiving values from the underlying observable sequence. 17 | */ 18 | func connect() -> Disposable 19 | } 20 | -------------------------------------------------------------------------------- /Pods/MASShortcut/Framework/MASDictionaryTransformer.h: -------------------------------------------------------------------------------- 1 | extern NSString *const MASDictionaryTransformerName; 2 | 3 | /** 4 | Converts shortcuts for storage in user defaults. 5 | 6 | User defaults can’t stored custom types directly, they have to 7 | be serialized to `NSData` or some other supported type like an 8 | `NSDictionary`. In Cocoa Bindings, the conversion can be done 9 | using value transformers like this one. 10 | 11 | There’s a built-in transformer (`NSKeyedUnarchiveFromDataTransformerName`) 12 | that converts any `NSCoding` types to `NSData`, but with shortcuts 13 | it makes sense to use a dictionary instead – the defaults look better 14 | when inspected with the `defaults` command-line utility and the 15 | format is compatible with an older sortcut library called Shortcut 16 | Recorder. 17 | */ 18 | @interface MASDictionaryTransformer : NSValueTransformer 19 | @end 20 | -------------------------------------------------------------------------------- /Pods/RxCocoa/Platform/RecursiveLock.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RecursiveLock.swift 3 | // Platform 4 | // 5 | // Created by Krunoslav Zaher on 12/18/16. 6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | import class Foundation.NSRecursiveLock 10 | 11 | #if TRACE_RESOURCES 12 | class RecursiveLock: NSRecursiveLock { 13 | override init() { 14 | _ = Resources.incrementTotal() 15 | super.init() 16 | } 17 | 18 | override func lock() { 19 | super.lock() 20 | _ = Resources.incrementTotal() 21 | } 22 | 23 | override func unlock() { 24 | super.unlock() 25 | _ = Resources.decrementTotal() 26 | } 27 | 28 | deinit { 29 | _ = Resources.decrementTotal() 30 | } 31 | } 32 | #else 33 | typealias RecursiveLock = NSRecursiveLock 34 | #endif 35 | -------------------------------------------------------------------------------- /Pods/RxSwift/Platform/RecursiveLock.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RecursiveLock.swift 3 | // Platform 4 | // 5 | // Created by Krunoslav Zaher on 12/18/16. 6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | import class Foundation.NSRecursiveLock 10 | 11 | #if TRACE_RESOURCES 12 | class RecursiveLock: NSRecursiveLock { 13 | override init() { 14 | _ = Resources.incrementTotal() 15 | super.init() 16 | } 17 | 18 | override func lock() { 19 | super.lock() 20 | _ = Resources.incrementTotal() 21 | } 22 | 23 | override func unlock() { 24 | super.unlock() 25 | _ = Resources.decrementTotal() 26 | } 27 | 28 | deinit { 29 | _ = Resources.decrementTotal() 30 | } 31 | } 32 | #else 33 | typealias RecursiveLock = NSRecursiveLock 34 | #endif 35 | -------------------------------------------------------------------------------- /Pods/Target Support Files/MASShortcut/ResourceBundle-MASShortcut-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleIdentifier 8 | ${PRODUCT_BUNDLE_IDENTIFIER} 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | ${PRODUCT_NAME} 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 2.3.6 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **System and Shadowsocksx-NG version:** 2 | 3 | - macOS 10.??.?? (16E????) 4 | - Shadowsocksx-NG 1.? 5 | 6 | **Expected behavior:** 7 | 8 | 9 | 10 | **Actual behavior:** 11 | 12 | (N/A for feature requests) 13 | 14 | **Steps to reproduce:** 15 | 16 | (N/A for feature requests) 17 | 18 | **How often does this happen?** 19 | 20 | (N/A for feature requests) 21 | 22 | **ss-local.log** 23 | 24 | Please upload the ss-local.log file here the file is in `~/Library/Logs` 25 | 1) Open 'Advanced Settings -> enable Verbose Mode' 26 | 2) Continue run `Shadowsocksx-NG` for 5 minutes 27 | 3) Upload the `~/Library/Logs/ss-local.log` here (with or without compress) 28 | 29 | **Application log** 30 | 31 | Open the `Console.app` and search `Shadowsocksx-NG` 32 | Copy paste the log here 33 | 34 | **Crash Log** 35 | 36 | If the app crashes and pop up a crash log, please copy and paste here 37 | 38 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/macOS/NSButton+Rx.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSButton+Rx.swift 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 5/17/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | #if os(macOS) 10 | 11 | #if !RX_NO_MODULE 12 | import RxSwift 13 | #endif 14 | import Cocoa 15 | 16 | extension Reactive where Base: NSButton { 17 | 18 | /// Reactive wrapper for control event. 19 | public var tap: ControlEvent { 20 | return controlEvent 21 | } 22 | 23 | /// Reactive wrapper for `state` property`. 24 | public var state: ControlProperty { 25 | return NSButton.rx.value( 26 | base, 27 | getter: { control in 28 | return control.state 29 | }, setter: { control, state in 30 | control.state = state 31 | } 32 | ) 33 | } 34 | } 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ScheduledItem.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 9/2/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | struct ScheduledItem 10 | : ScheduledItemType 11 | , InvocableType { 12 | typealias Action = (T) -> Disposable 13 | 14 | private let _action: Action 15 | private let _state: T 16 | 17 | private let _disposable = SingleAssignmentDisposable() 18 | 19 | var isDisposed: Bool { 20 | return _disposable.isDisposed 21 | } 22 | 23 | init(action: @escaping Action, state: T) { 24 | _action = action 25 | _state = state 26 | } 27 | 28 | func invoke() { 29 | _disposable.setDisposable(_action(_state)) 30 | } 31 | 32 | func dispose() { 33 | _disposable.dispose() 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AnonymousObserver.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 2/8/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | final class AnonymousObserver : ObserverBase { 10 | typealias Element = ElementType 11 | 12 | typealias EventHandler = (Event) -> Void 13 | 14 | private let _eventHandler : EventHandler 15 | 16 | init(_ eventHandler: @escaping EventHandler) { 17 | #if TRACE_RESOURCES 18 | let _ = Resources.incrementTotal() 19 | #endif 20 | _eventHandler = eventHandler 21 | } 22 | 23 | override func onCore(_ event: Event) { 24 | return _eventHandler(event) 25 | } 26 | 27 | #if TRACE_RESOURCES 28 | deinit { 29 | let _ = Resources.decrementTotal() 30 | } 31 | #endif 32 | } 33 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/Utils.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Utils.swift 3 | // ShadowsocksX-NG 4 | // 5 | // Created by 邱宇舟 on 16/6/7. 6 | // Copyright © 2016年 qiuyuzhou. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | extension String { 12 | var localized: String { 13 | return NSLocalizedString(self, tableName: nil, bundle: Bundle.main, value: "", comment: "") 14 | } 15 | } 16 | 17 | extension Data { 18 | func sha1() -> String { 19 | let data = self 20 | var digest = [UInt8](repeating: 0, count: Int(CC_SHA1_DIGEST_LENGTH)) 21 | CC_SHA1((data as NSData).bytes, CC_LONG(data.count), &digest) 22 | let hexBytes = digest.map { String(format: "%02hhx", $0) } 23 | return hexBytes.joined(separator: "") 24 | } 25 | } 26 | 27 | enum ProxyType { 28 | case pac 29 | case global 30 | } 31 | 32 | struct Globals { 33 | static var proxyType = ProxyType.pac 34 | } 35 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Observers/ObserverBase.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ObserverBase.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 2/15/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | class ObserverBase : Disposable, ObserverType { 10 | typealias E = ElementType 11 | 12 | private var _isStopped: AtomicInt = 0 13 | 14 | func on(_ event: Event) { 15 | switch event { 16 | case .next: 17 | if _isStopped == 0 { 18 | onCore(event) 19 | } 20 | case .error, .completed: 21 | if AtomicCompareAndSwap(0, 1, &_isStopped) { 22 | onCore(event) 23 | } 24 | } 25 | } 26 | 27 | func onCore(_ event: Event) { 28 | rxAbstractMethod() 29 | } 30 | 31 | func dispose() { 32 | _ = AtomicCompareAndSwap(0, 1, &_isStopped) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Observables/Never.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Never.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 8/30/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | extension Observable { 10 | 11 | /** 12 | Returns a non-terminating observable sequence, which can be used to denote an infinite duration. 13 | 14 | - seealso: [never operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html) 15 | 16 | - returns: An observable sequence whose observers will never get called. 17 | */ 18 | public static func never() -> Observable { 19 | return NeverProducer() 20 | } 21 | } 22 | 23 | final fileprivate class NeverProducer : Producer { 24 | override func subscribe(_ observer: O) -> Disposable where O.E == Element { 25 | return Disposables.create() 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/ShortcutsController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ShortcutsController.m 3 | // ShadowsocksX-NG 4 | // 5 | // Created by 邱宇舟 on 2017/3/10. 6 | // Copyright © 2017年 qiuyuzhou. All rights reserved. 7 | // 8 | 9 | #import "ShortcutsController.h" 10 | 11 | #import 12 | 13 | 14 | @implementation ShortcutsController 15 | 16 | + (void)bindShortcuts { 17 | MASShortcutBinder* binder = [MASShortcutBinder sharedBinder]; 18 | [binder 19 | bindShortcutWithDefaultsKey: @"ToggleRunning" 20 | toAction:^{ 21 | [[NSNotificationCenter defaultCenter] postNotificationName: @"NOTIFY_TOGGLE_RUNNING_SHORTCUT" object: nil]; 22 | }]; 23 | [binder 24 | bindShortcutWithDefaultsKey: @"SwitchProxyMode" 25 | toAction:^{ 26 | [[NSNotificationCenter defaultCenter] postNotificationName: @"NOTIFY_SWITCH_PROXY_MODE_SHORTCUT" object: nil]; 27 | }]; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Alamofire (4.2.0) 3 | - BRLOptionParser (0.3.1) 4 | - GCDWebServer (3.4.2): 5 | - GCDWebServer/Core (= 3.4.2) 6 | - GCDWebServer/Core (3.4.2) 7 | - MASShortcut (2.3.6) 8 | - RxCocoa (3.6.1): 9 | - RxSwift (~> 3.6) 10 | - RxSwift (3.6.1) 11 | 12 | DEPENDENCIES: 13 | - Alamofire (~> 4.2.0) 14 | - BRLOptionParser (~> 0.3.1) 15 | - GCDWebServer (~> 3.0) 16 | - MASShortcut (~> 2) 17 | - RxCocoa (~> 3.0) 18 | - RxSwift (~> 3.0) 19 | 20 | SPEC CHECKSUMS: 21 | Alamofire: aa2e09d871c9160ac53c90e83c68064a94e3dfbe 22 | BRLOptionParser: a03256a8ff003ca1f5376c55f55f210e085a3958 23 | GCDWebServer: 8d67ee9f634b4bb91eb4b8aee440318a5fc6debd 24 | MASShortcut: 9c215e8a8a78f3d01ce56da48e2730ab66b538fa 25 | RxCocoa: 84a08739ab186248c7f31ce4ee92d6f8a947d690 26 | RxSwift: f9de85ea20cd2f7716ee5409fc13523dc638e4e4 27 | 28 | PODFILE CHECKSUM: 5abdd116651e99453ca2480b0a17344fadc111ea 29 | 30 | COCOAPODS: 1.3.1 31 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Observables/Empty.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Empty.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 8/30/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | extension Observable { 10 | /** 11 | Returns an empty observable sequence, using the specified scheduler to send out the single `Completed` message. 12 | 13 | - seealso: [empty operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html) 14 | 15 | - returns: An observable sequence with no elements. 16 | */ 17 | public static func empty() -> Observable { 18 | return EmptyProducer() 19 | } 20 | } 21 | 22 | final fileprivate class EmptyProducer : Producer { 23 | override func subscribe(_ observer: O) -> Disposable where O.E == Element { 24 | observer.on(.completed) 25 | return Disposables.create() 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Alamofire (4.2.0) 3 | - BRLOptionParser (0.3.1) 4 | - GCDWebServer (3.4.2): 5 | - GCDWebServer/Core (= 3.4.2) 6 | - GCDWebServer/Core (3.4.2) 7 | - MASShortcut (2.3.6) 8 | - RxCocoa (3.6.1): 9 | - RxSwift (~> 3.6) 10 | - RxSwift (3.6.1) 11 | 12 | DEPENDENCIES: 13 | - Alamofire (~> 4.2.0) 14 | - BRLOptionParser (~> 0.3.1) 15 | - GCDWebServer (~> 3.0) 16 | - MASShortcut (~> 2) 17 | - RxCocoa (~> 3.0) 18 | - RxSwift (~> 3.0) 19 | 20 | SPEC CHECKSUMS: 21 | Alamofire: aa2e09d871c9160ac53c90e83c68064a94e3dfbe 22 | BRLOptionParser: a03256a8ff003ca1f5376c55f55f210e085a3958 23 | GCDWebServer: 8d67ee9f634b4bb91eb4b8aee440318a5fc6debd 24 | MASShortcut: 9c215e8a8a78f3d01ce56da48e2730ab66b538fa 25 | RxCocoa: 84a08739ab186248c7f31ce4ee92d6f8a947d690 26 | RxSwift: f9de85ea20cd2f7716ee5409fc13523dc638e4e4 27 | 28 | PODFILE CHECKSUM: 5abdd116651e99453ca2480b0a17344fadc111ea 29 | 30 | COCOAPODS: 1.3.1 31 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/Runtime/include/_RXKVOObserver.h: -------------------------------------------------------------------------------- 1 | // 2 | // _RXKVOObserver.h 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 7/11/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | ################################################################################ 13 | This file is part of RX private API 14 | ################################################################################ 15 | */ 16 | 17 | // Exists because if written in Swift, reading unowned is disabled during dealloc process 18 | @interface _RXKVOObserver : NSObject 19 | 20 | -(instancetype)initWithTarget:(id)target 21 | retainTarget:(BOOL)retainTarget 22 | keyPath:(NSString*)keyPath 23 | options:(NSKeyValueObservingOptions)options 24 | callback:(void (^)(id))callback; 25 | 26 | -(void)dispose; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/macOS/NSView+Rx.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSView+Rx.swift 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 12/6/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | #if os(macOS) 10 | 11 | import Cocoa 12 | #if !RX_NO_MODULE 13 | import RxSwift 14 | #endif 15 | 16 | extension Reactive where Base: NSView { 17 | /// Bindable sink for `hidden` property. 18 | public var isHidden: UIBindingObserver { 19 | return UIBindingObserver(UIElement: self.base) { view, value in 20 | view.isHidden = value 21 | } 22 | } 23 | 24 | /// Bindable sink for `alphaValue` property. 25 | public var alpha: UIBindingObserver { 26 | return UIBindingObserver(UIElement: self.base) { view, value in 27 | view.alphaValue = value 28 | } 29 | } 30 | } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /Pods/MASShortcut/Framework/MASShortcutMonitor.h: -------------------------------------------------------------------------------- 1 | #import "MASShortcut.h" 2 | 3 | /** 4 | Executes action when a shortcut is pressed. 5 | 6 | There can only be one instance of this class, otherwise things 7 | will probably not work. (There’s a Carbon event handler inside 8 | and there can only be one Carbon event handler of a given type.) 9 | */ 10 | @interface MASShortcutMonitor : NSObject 11 | 12 | - (instancetype) init __unavailable; 13 | + (instancetype) sharedMonitor; 14 | 15 | /** 16 | Register a shortcut along with an action. 17 | 18 | Attempting to insert an already registered shortcut probably won’t work. 19 | It may burn your house or cut your fingers. You have been warned. 20 | */ 21 | - (BOOL) registerShortcut: (MASShortcut*) shortcut withAction: (dispatch_block_t) action; 22 | - (BOOL) isShortcutRegistered: (MASShortcut*) shortcut; 23 | 24 | - (void) unregisterShortcut: (MASShortcut*) shortcut; 25 | - (void) unregisterAllShortcuts; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RxCocoa/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 3.6.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RxSwift/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 3.6.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Alamofire/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 4.2.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/GCDWebServer/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 3.4.2 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/MASShortcut/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 2.3.6 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/MASShortcut/Framework/MASKeyMasks.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | // https://github.com/shpakovski/MASShortcut/issues/99 4 | // 5 | // Long story short: NSControlKeyMask and friends were replaced with NSEventModifierFlagControl 6 | // and similar in macOS Sierra. The project builds fine & clean, but including MASShortcut in 7 | // a project with deployment target set to 10.12 results in several deprecation warnings because 8 | // of the control masks. Simply replacing the old symbols with the new ones isn’t an option, 9 | // since it breaks the build on older SDKs – in Travis, for example. 10 | // 11 | // It should be safe to remove this whole thing once the 10.12 SDK is ubiquitous. 12 | 13 | #if __MAC_OS_X_VERSION_MAX_ALLOWED < 101200 14 | #define NSEventModifierFlagCommand NSCommandKeyMask 15 | #define NSEventModifierFlagControl NSControlKeyMask 16 | #define NSEventModifierFlagOption NSAlternateKeyMask 17 | #define NSEventModifierFlagShift NSShiftKeyMask 18 | #endif 19 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ShadowsocksX-NG/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ShadowsocksX-NGTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/Common/RxTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RxTarget.swift 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 7/12/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | import class Foundation.NSObject 10 | 11 | #if !RX_NO_MODULE 12 | import RxSwift 13 | #endif 14 | 15 | class RxTarget : NSObject 16 | , Disposable { 17 | 18 | private var retainSelf: RxTarget? 19 | 20 | override init() { 21 | super.init() 22 | self.retainSelf = self 23 | 24 | #if TRACE_RESOURCES 25 | _ = Resources.incrementTotal() 26 | #endif 27 | 28 | #if DEBUG 29 | MainScheduler.ensureExecutingOnScheduler() 30 | #endif 31 | } 32 | 33 | func dispose() { 34 | #if DEBUG 35 | MainScheduler.ensureExecutingOnScheduler() 36 | #endif 37 | self.retainSelf = nil 38 | } 39 | 40 | #if TRACE_RESOURCES 41 | deinit { 42 | _ = Resources.decrementTotal() 43 | } 44 | #endif 45 | } 46 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Concurrency/Lock.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Lock.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 3/31/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | protocol Lock { 10 | func lock() 11 | func unlock() 12 | } 13 | 14 | // https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000321.html 15 | typealias SpinLock = RecursiveLock 16 | 17 | extension RecursiveLock : Lock { 18 | @inline(__always) 19 | final func performLocked(_ action: () -> Void) { 20 | lock(); defer { unlock() } 21 | action() 22 | } 23 | 24 | @inline(__always) 25 | final func calculateLocked(_ action: () -> T) -> T { 26 | lock(); defer { unlock() } 27 | return action() 28 | } 29 | 30 | @inline(__always) 31 | final func calculateLockedOrFail(_ action: () throws -> T) throws -> T { 32 | lock(); defer { unlock() } 33 | let result = try action() 34 | return result 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Pods/Target Support Files/GCDWebServer/GCDWebServer-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "GCDWebServer.h" 14 | #import "GCDWebServerConnection.h" 15 | #import "GCDWebServerFunctions.h" 16 | #import "GCDWebServerHTTPStatusCodes.h" 17 | #import "GCDWebServerRequest.h" 18 | #import "GCDWebServerResponse.h" 19 | #import "GCDWebServerDataRequest.h" 20 | #import "GCDWebServerFileRequest.h" 21 | #import "GCDWebServerMultiPartFormRequest.h" 22 | #import "GCDWebServerURLEncodedFormRequest.h" 23 | #import "GCDWebServerDataResponse.h" 24 | #import "GCDWebServerErrorResponse.h" 25 | #import "GCDWebServerFileResponse.h" 26 | #import "GCDWebServerStreamedResponse.h" 27 | 28 | FOUNDATION_EXPORT double GCDWebServerVersionNumber; 29 | FOUNDATION_EXPORT const unsigned char GCDWebServerVersionString[]; 30 | 31 | -------------------------------------------------------------------------------- /Pods/MASShortcut/Framework/MASShortcutView.h: -------------------------------------------------------------------------------- 1 | @class MASShortcut, MASShortcutValidator; 2 | 3 | extern NSString *const MASShortcutBinding; 4 | 5 | typedef enum { 6 | MASShortcutViewStyleDefault = 0, // Height = 19 px 7 | MASShortcutViewStyleTexturedRect, // Height = 25 px 8 | MASShortcutViewStyleRounded, // Height = 43 px 9 | MASShortcutViewStyleFlat 10 | } MASShortcutViewStyle; 11 | 12 | @interface MASShortcutView : NSView 13 | 14 | @property (nonatomic, strong) MASShortcut *shortcutValue; 15 | @property (nonatomic, strong) MASShortcutValidator *shortcutValidator; 16 | @property (nonatomic, getter = isRecording) BOOL recording; 17 | @property (nonatomic, getter = isEnabled) BOOL enabled; 18 | @property (nonatomic, copy) void (^shortcutValueChange)(MASShortcutView *sender); 19 | @property (nonatomic, assign) MASShortcutViewStyle style; 20 | 21 | /// Returns custom class for drawing control. 22 | + (Class)shortcutCellClass; 23 | 24 | - (void)setAcceptsFirstResponder:(BOOL)value; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ShadowsocksX-NGTests/Pods-ShadowsocksX-NGTests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Observables/Error.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Error.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 8/30/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | extension Observable { 10 | /** 11 | Returns an observable sequence that terminates with an `error`. 12 | 13 | - seealso: [throw operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html) 14 | 15 | - returns: The observable sequence that terminates with specified error. 16 | */ 17 | public static func error(_ error: Swift.Error) -> Observable { 18 | return ErrorProducer(error: error) 19 | } 20 | } 21 | 22 | final fileprivate class ErrorProducer : Producer { 23 | private let _error: Swift.Error 24 | 25 | init(error: Swift.Error) { 26 | _error = error 27 | } 28 | 29 | override func subscribe(_ observer: O) -> Disposable where O.E == Element { 30 | observer.on(.error(_error)) 31 | return Disposables.create() 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/Common/NSLayoutConstraint+Rx.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSLayoutConstraint+Rx.swift 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 12/6/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | #if !os(Linux) 10 | 11 | #if os(macOS) 12 | import Cocoa 13 | #else 14 | import UIKit 15 | #endif 16 | 17 | #if !RX_NO_MODULE 18 | import RxSwift 19 | #endif 20 | 21 | #if os(iOS) || os(macOS) || os(tvOS) 22 | extension Reactive where Base: NSLayoutConstraint { 23 | /// Bindable sink for `constant` property. 24 | public var constant: UIBindingObserver { 25 | return UIBindingObserver(UIElement: self.base) { constraint, constant in 26 | constraint.constant = constant 27 | } 28 | } 29 | 30 | /// Bindable sink for `active` property. 31 | @available(iOS 8, OSX 10.10, *) 32 | public var active: UIBindingObserver { 33 | return UIBindingObserver(UIElement: self.base) { constraint, value in 34 | constraint.isActive = value 35 | } 36 | } 37 | } 38 | 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /Pods/MASShortcut/Framework/MASShortcutView+Bindings.h: -------------------------------------------------------------------------------- 1 | #import "MASShortcutView.h" 2 | 3 | /** 4 | A simplified interface to bind the recorder value to user defaults. 5 | 6 | You can bind the `shortcutValue` to user defaults using the standard 7 | `bind:toObject:withKeyPath:options:` call, but since that’s a lot to type 8 | and read, here’s a simpler option. 9 | 10 | Setting the `associatedUserDefaultsKey` binds the view’s shortcut value 11 | to the given user defaults key. You can supply a value transformer to convert 12 | values between user defaults and `MASShortcut`. If you don’t supply 13 | a transformer, the `NSUnarchiveFromDataTransformerName` will be used 14 | automatically. 15 | 16 | Set `associatedUserDefaultsKey` to `nil` to disconnect the binding. 17 | */ 18 | @interface MASShortcutView (Bindings) 19 | 20 | @property(copy) NSString *associatedUserDefaultsKey; 21 | 22 | - (void) setAssociatedUserDefaultsKey: (NSString*) newKey withTransformer: (NSValueTransformer*) transformer; 23 | - (void) setAssociatedUserDefaultsKey: (NSString*) newKey withTransformerName: (NSString*) transformerName; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Pods/RxCocoa/LICENSE.md: -------------------------------------------------------------------------------- 1 | **The MIT License** 2 | **Copyright © 2015 Krunoslav Zaher** 3 | **All rights reserved.** 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /Pods/RxSwift/LICENSE.md: -------------------------------------------------------------------------------- 1 | **The MIT License** 2 | **Copyright © 2015 Krunoslav Zaher** 3 | **All rights reserved.** 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BooleanDisposable.swift 3 | // RxSwift 4 | // 5 | // Created by Junior B. on 10/29/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | /// Represents a disposable resource that can be checked for disposal status. 10 | public final class BooleanDisposable : Cancelable { 11 | 12 | internal static let BooleanDisposableTrue = BooleanDisposable(isDisposed: true) 13 | private var _isDisposed = false 14 | 15 | /// Initializes a new instance of the `BooleanDisposable` class 16 | public init() { 17 | } 18 | 19 | /// Initializes a new instance of the `BooleanDisposable` class with given value 20 | public init(isDisposed: Bool) { 21 | self._isDisposed = isDisposed 22 | } 23 | 24 | /// - returns: Was resource disposed. 25 | public var isDisposed: Bool { 26 | return _isDisposed 27 | } 28 | 29 | /// Sets the status to disposed, which can be observer through the `isDisposed` property. 30 | public func dispose() { 31 | _isDisposed = true 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ShadowsocksX-NGTests/Pods-ShadowsocksX-NGTests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CODE_SIGN_IDENTITY = 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/GCDWebServer" "$PODS_CONFIGURATION_BUILD_DIR/MASShortcut" "$PODS_CONFIGURATION_BUILD_DIR/RxCocoa" "$PODS_CONFIGURATION_BUILD_DIR/RxSwift" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/../Frameworks' '@loader_path/../Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/GCDWebServer/GCDWebServer.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/MASShortcut/MASShortcut.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RxCocoa/RxCocoa.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RxSwift/RxSwift.framework/Headers" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /LaunchHelper/LaunchHelper/Base.lproj/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ShadowsocksX-NGTests/Pods-ShadowsocksX-NGTests.release.xcconfig: -------------------------------------------------------------------------------- 1 | CODE_SIGN_IDENTITY = 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/GCDWebServer" "$PODS_CONFIGURATION_BUILD_DIR/MASShortcut" "$PODS_CONFIGURATION_BUILD_DIR/RxCocoa" "$PODS_CONFIGURATION_BUILD_DIR/RxSwift" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/../Frameworks' '@loader_path/../Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/GCDWebServer/GCDWebServer.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/MASShortcut/MASShortcut.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RxCocoa/RxCocoa.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RxSwift/RxSwift.framework/Headers" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Pods/MASShortcut/Framework/MASHotKey.m: -------------------------------------------------------------------------------- 1 | #import "MASHotKey.h" 2 | 3 | FourCharCode const MASHotKeySignature = 'MASS'; 4 | 5 | @interface MASHotKey () 6 | @property(assign) EventHotKeyRef hotKeyRef; 7 | @property(assign) UInt32 carbonID; 8 | @end 9 | 10 | @implementation MASHotKey 11 | 12 | - (instancetype) initWithShortcut: (MASShortcut*) shortcut 13 | { 14 | self = [super init]; 15 | 16 | static UInt32 CarbonHotKeyID = 0; 17 | 18 | _carbonID = ++CarbonHotKeyID; 19 | EventHotKeyID hotKeyID = { .signature = MASHotKeySignature, .id = _carbonID }; 20 | 21 | OSStatus status = RegisterEventHotKey([shortcut carbonKeyCode], [shortcut carbonFlags], 22 | hotKeyID, GetEventDispatcherTarget(), 0, &_hotKeyRef); 23 | 24 | if (status != noErr) { 25 | return nil; 26 | } 27 | 28 | return self; 29 | } 30 | 31 | + (instancetype) registeredHotKeyWithShortcut: (MASShortcut*) shortcut 32 | { 33 | return [[self alloc] initWithShortcut:shortcut]; 34 | } 35 | 36 | - (void) dealloc 37 | { 38 | if (_hotKeyRef) { 39 | UnregisterEventHotKey(_hotKeyRef); 40 | _hotKeyRef = NULL; 41 | } 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ##### 2 | # OS X temporary files that should never be committed 3 | .DS_Store 4 | *.swp 5 | *.lock 6 | profile 7 | 8 | #### 9 | # Xcode temporary files that should never be committed 10 | *~.nib 11 | 12 | #### 13 | # Objective-C/Swift specific 14 | *.hmap 15 | *.ipa 16 | 17 | #### 18 | # Xcode build files 19 | DerivedData/ 20 | build/ 21 | Builds/ 22 | 23 | ##### 24 | # Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups) 25 | *.pbxuser 26 | *.mode1v3 27 | *.mode2v3 28 | *.perspectivev3 29 | !default.pbxuser 30 | !default.mode1v3 31 | !default.mode2v3 32 | !default.perspectivev3 33 | 34 | #### 35 | # Xcode 4 36 | xcuserdata 37 | !xcschemes 38 | # Xcode 4 39 | *.moved-aside 40 | 41 | #### 42 | # XCode 4 workspaces - more detailed 43 | !xcshareddata 44 | !default.xcworkspace 45 | *.xcworkspacedata 46 | 47 | 48 | #### 49 | # Xcode 5 50 | *.xccheckout 51 | *.xcuserstate 52 | 53 | #### 54 | # Xcode 7 55 | *.xcscmblueprint 56 | 57 | #### 58 | # AppCode 59 | .idea/ 60 | 61 | #### 62 | # Other Xcode files 63 | profile 64 | *.hmap 65 | *.ipa 66 | 67 | #### 68 | # Carthage 69 | Carthage/Build 70 | 71 | IDEWorkspaceChecks.plist 72 | -------------------------------------------------------------------------------- /ShadowsocksX-NGTests/ShadowsocksX_NGTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ShadowsocksX_NGTests.swift 3 | // ShadowsocksX-NGTests 4 | // 5 | // Created by 邱宇舟 on 16/6/5. 6 | // Copyright © 2016年 qiuyuzhou. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import ShadowsocksX_NG 11 | 12 | class ShadowsocksX_NGTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Pods/Alamofire/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Pods/BRLOptionParser/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright © 2013-2015 Stephen Celis () 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 9 | of the Software, and to permit persons to whom the Software is furnished to do 10 | so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /LaunchHelper/LaunchHelper/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /LaunchHelper/LaunchHelper/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 2 23 | LSBackgroundOnly 24 | 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | NSHumanReadableCopyright 28 | Copyright © 2017年 qiuyuzhou. All rights reserved. 29 | NSMainNibFile 30 | MainMenu 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **Describe the bug** 8 | A clear and concise description of what the bug is. 9 | 10 | **To Reproduce** 11 | Steps to reproduce the behavior 12 | 13 | **Expected behavior** 14 | A clear and concise description of what you expected to happen. 15 | 16 | **Screenshots** 17 | If applicable, add screenshots to help explain your problem. 18 | 19 | **System and Shadowsocksx-NG version: (please complete the following information):** 20 | - OS Version: [e.g. 10.13.1] 21 | - Version [e.g. 22] 22 | 23 | **ss-local.log** 24 | 25 | Please upload the ss-local.log file here the file is in `~/Library/Logs` 26 | 1) Open 'Advanced Settings -> enable Verbose Mode' 27 | 2) Continue run `Shadowsocksx-NG` for 5 minutes 28 | 3) Upload the `~/Library/Logs/ss-local.log` here (with or without compress) 29 | 30 | **Application log** 31 | 32 | Open the `Console.app` and search `Shadowsocksx-NG` 33 | Copy paste the log here 34 | 35 | **Crash Log** 36 | 37 | If the app crashes and pop up a crash log, please copy and paste here 38 | 39 | **Additional context** 40 | Add any other context about the problem here. 41 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/example-gui-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": 0, 3 | "random": false, 4 | "global": false, 5 | "enabled": true, 6 | "shareOverLan": false, 7 | "isDefault": false, 8 | "localPort": 1080, 9 | "pacUrl": null, 10 | "useOnlinePac": false, 11 | "reconnectTimes": 3, 12 | "randomAlgorithm": 0, 13 | "TTL": 0, 14 | "proxyEnable": false, 15 | "proxyType": 0, 16 | "proxyHost": null, 17 | "proxyPort": 0, 18 | "proxyAuthUser": null, 19 | "proxyAuthPass": null, 20 | "authUser": null, 21 | "authPass": null, 22 | "autoban": false, 23 | "configs": [{ 24 | "remarks": "example", 25 | "server": "abc.xyz", 26 | "server_port": 1234, 27 | "method": "rc4-md5", 28 | "remarks_base64": "ZXhhbXBsZQ==", 29 | "password": "passwd", 30 | "tcp_over_udp": false, 31 | "udp_over_tcp": false, 32 | "enable": true 33 | },{ 34 | "remarks": "example2", 35 | "server": "xyz.xyz", 36 | "server_port": 1234, 37 | "method": "rc4-md5", 38 | "remarks_base64": "ZXhhbXBsZTI=", 39 | "password": "passwd", 40 | "tcp_over_udp": false, 41 | "udp_over_tcp": false, 42 | "enable": true 43 | }] 44 | } -------------------------------------------------------------------------------- /Pods/MASShortcut/Framework/MASShortcutValidator.h: -------------------------------------------------------------------------------- 1 | #import "MASShortcut.h" 2 | 3 | /** 4 | This class is used by the recording control to tell which shortcuts are acceptable. 5 | 6 | There are two kinds of shortcuts that are not considered acceptable: shortcuts that 7 | are too simple (like single letter keys) and shortcuts that are already used by the 8 | operating system. 9 | */ 10 | @interface MASShortcutValidator : NSObject 11 | 12 | /** 13 | Set to `YES` if you want to accept Option-something shortcuts. 14 | 15 | `NO` by default, since Option-something shortcuts are often used by system, 16 | for example Option-G will type the © sign. This also applies to Option-Shift 17 | shortcuts – in other words, shortcut recorder will not accept shortcuts like 18 | Option-Shift-K by default. (Again, since Option-Shift-K inserts the Apple 19 | logo sign by default.) 20 | */ 21 | @property(assign) BOOL allowAnyShortcutWithOptionModifier; 22 | 23 | + (instancetype) sharedValidator; 24 | 25 | - (BOOL) isShortcutValid: (MASShortcut*) shortcut; 26 | - (BOOL) isShortcut: (MASShortcut*) shortcut alreadyTakenInMenu: (NSMenu*) menu explanation: (NSString**) explanation; 27 | - (BOOL) isShortcutAlreadyTakenBySystem: (MASShortcut*) shortcut explanation: (NSString**) explanation; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Observable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Observable.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 2/8/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | /// A type-erased `ObservableType`. 10 | /// 11 | /// It represents a push style sequence. 12 | public class Observable : ObservableType { 13 | /// Type of elements in sequence. 14 | public typealias E = Element 15 | 16 | init() { 17 | #if TRACE_RESOURCES 18 | let _ = Resources.incrementTotal() 19 | #endif 20 | } 21 | 22 | public func subscribe(_ observer: O) -> Disposable where O.E == E { 23 | rxAbstractMethod() 24 | } 25 | 26 | public func asObservable() -> Observable { 27 | return self 28 | } 29 | 30 | deinit { 31 | #if TRACE_RESOURCES 32 | let _ = Resources.decrementTotal() 33 | #endif 34 | } 35 | 36 | // this is kind of ugly I know :( 37 | // Swift compiler reports "Not supported yet" when trying to override protocol extensions, so ¯\_(ツ)_/¯ 38 | 39 | /// Optimizations for map operator 40 | internal func composeMap(_ transform: @escaping (Element) throws -> R) -> Observable { 41 | return _map(source: self, transform: transform) 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/install_ss_local.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # install_ss_local.sh 4 | # ShadowsocksX-NG 5 | # 6 | # Created by 邱宇舟 on 16/6/6. 7 | # Copyright © 2016年 qiuyuzhou. All rights reserved. 8 | 9 | 10 | cd `dirname "${BASH_SOURCE[0]}"` 11 | 12 | NGDir="$HOME/Library/Application Support/ShadowsocksX-NG" 13 | TargetDir="$NGDir/ss-local-3.1.3" 14 | LatestTargetDir="$NGDir/ss-local-latest" 15 | 16 | echo ngdir: ${NGDir} 17 | 18 | mkdir -p "$TargetDir" 19 | cp -f ss-local "$TargetDir" 20 | rm -f "$LatestTargetDir" 21 | ln -s "$TargetDir" "$LatestTargetDir" 22 | 23 | cp -f libev.4.dylib "$TargetDir" 24 | 25 | # 2.8.0 https://bintray.com/homebrew/bottles/mbedtls 26 | cp -f libmbedcrypto.2.8.0.dylib "$TargetDir" 27 | ln -s "$TargetDir/libmbedcrypto.2.8.0.dylib" "$TargetDir/libmbedcrypto.1.dylib" 28 | 29 | # 8.42 https://bintray.com/homebrew/bottles/pcre 30 | cp -f libpcre.1.dylib "$TargetDir" 31 | 32 | # 1.0.16 https://bintray.com/homebrew/bottles/libsodium 33 | cp -f libsodium.23.dylib "$TargetDir" 34 | ln -s "$TargetDir/libsodium.23.dylib" "$TargetDir/libsodium.dylib" 35 | 36 | #cp -f libudns.0.dylib "$TargetDir" 37 | 38 | # 1.14.0 https://bintray.com/homebrew/bottles/c-ares 39 | cp -f libcares.2.dylib "$TargetDir" 40 | ln -s "$TargetDir/libcares.2.dylib" "$TargetDir/libcares.dylib" 41 | 42 | echo done 43 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/Foundation/NotificationCenter+Rx.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NotificationCenter+Rx.swift 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 5/2/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | import class Foundation.NotificationCenter 10 | import struct Foundation.Notification 11 | 12 | #if !RX_NO_MODULE 13 | import RxSwift 14 | #endif 15 | 16 | extension Reactive where Base: NotificationCenter { 17 | /** 18 | Transforms notifications posted to notification center to observable sequence of notifications. 19 | 20 | - parameter name: Optional name used to filter notifications. 21 | - parameter object: Optional object used to filter notifications. 22 | - returns: Observable sequence of posted notifications. 23 | */ 24 | public func notification(_ name: Notification.Name?, object: AnyObject? = nil) -> Observable { 25 | return Observable.create { [weak object] observer in 26 | let nsObserver = self.base.addObserver(forName: name, object: object, queue: nil) { notification in 27 | observer.on(.next(notification)) 28 | } 29 | 30 | return Disposables.create { 31 | self.base.removeObserver(nsObserver) 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/ObserverType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ObserverType.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 2/8/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | /// Supports push-style iteration over an observable sequence. 10 | public protocol ObserverType { 11 | /// The type of elements in sequence that observer can observe. 12 | associatedtype E 13 | 14 | /// Notify observer about sequence event. 15 | /// 16 | /// - parameter event: Event that occurred. 17 | func on(_ event: Event) 18 | } 19 | 20 | /// Convenience API extensions to provide alternate next, error, completed events 21 | extension ObserverType { 22 | 23 | /// Convenience method equivalent to `on(.next(element: E))` 24 | /// 25 | /// - parameter element: Next element to send to observer(s) 26 | public final func onNext(_ element: E) { 27 | on(.next(element)) 28 | } 29 | 30 | /// Convenience method equivalent to `on(.completed)` 31 | public final func onCompleted() { 32 | on(.completed) 33 | } 34 | 35 | /// Convenience method equivalent to `on(.error(Swift.Error))` 36 | /// - parameter error: Swift.Error to send to observer(s) 37 | public final func onError(_ error: Swift.Error) { 38 | on(.error(error)) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ShadowsocksX-NG/Pods-ShadowsocksX-NG.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | CODE_SIGN_IDENTITY = 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/GCDWebServer" "$PODS_CONFIGURATION_BUILD_DIR/MASShortcut" "$PODS_CONFIGURATION_BUILD_DIR/RxCocoa" "$PODS_CONFIGURATION_BUILD_DIR/RxSwift" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/../Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/GCDWebServer/GCDWebServer.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/MASShortcut/MASShortcut.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RxCocoa/RxCocoa.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RxSwift/RxSwift.framework/Headers" 7 | OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "GCDWebServer" -framework "MASShortcut" -framework "RxCocoa" -framework "RxSwift" 8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 9 | PODS_BUILD_DIR = $BUILD_DIR 10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 12 | PODS_ROOT = ${SRCROOT}/Pods 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ShadowsocksX-NG/Pods-ShadowsocksX-NG.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | CODE_SIGN_IDENTITY = 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/GCDWebServer" "$PODS_CONFIGURATION_BUILD_DIR/MASShortcut" "$PODS_CONFIGURATION_BUILD_DIR/RxCocoa" "$PODS_CONFIGURATION_BUILD_DIR/RxSwift" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/../Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/GCDWebServer/GCDWebServer.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/MASShortcut/MASShortcut.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RxCocoa/RxCocoa.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RxSwift/RxSwift.framework/Headers" 7 | OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "GCDWebServer" -framework "MASShortcut" -framework "RxCocoa" -framework "RxSwift" 8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 9 | PODS_BUILD_DIR = $BUILD_DIR 10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 12 | PODS_ROOT = ${SRCROOT}/Pods 13 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/PreferencesWinController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PreferencesWinController.swift 3 | // ShadowsocksX-NG 4 | // 5 | // Created by 邱宇舟 on 2017/3/11. 6 | // Copyright © 2017年 qiuyuzhou. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import RxCocoa 11 | import RxSwift 12 | 13 | class PreferencesWinController: NSWindowController { 14 | 15 | @IBOutlet weak var toolbar: NSToolbar! 16 | @IBOutlet weak var tabView: NSTabView! 17 | 18 | override func windowDidLoad() { 19 | super.windowDidLoad() 20 | 21 | // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. 22 | toolbar.selectedItemIdentifier = NSToolbarItem.Identifier(rawValue: "general") 23 | } 24 | 25 | @objc func windowWillClose(_ notification: Notification) { 26 | NotificationCenter.default 27 | .post(name: NOTIFY_CONF_CHANGED, object: nil) 28 | } 29 | 30 | @IBAction func toolbarAction(sender: NSToolbarItem) { 31 | tabView.selectTabViewItem(withIdentifier: sender.itemIdentifier) 32 | } 33 | 34 | @IBAction func resetProxyExceptions(sender: NSButton) { 35 | let defaults = UserDefaults.standard 36 | defaults.set("127.0.0.1, localhost, 192.168.0.0/16, 10.0.0.0/8", forKey: "ProxyExceptions") 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /Pods/MASShortcut/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012-2013, Vadim Shpakovski 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 2. Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 14 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 17 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 18 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 19 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 20 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 22 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/GroupedObservable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GroupedObservable.swift 3 | // RxSwift 4 | // 5 | // Created by Tomi Koskinen on 01/12/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | /// Represents an observable sequence of elements that have a common key. 10 | public struct GroupedObservable : ObservableType { 11 | public typealias E = Element 12 | 13 | /// Gets the common key. 14 | public let key: Key 15 | 16 | private let source: Observable 17 | 18 | /// Initializes grouped observable sequence with key and source observable sequence. 19 | /// 20 | /// - parameter key: Grouped observable sequence key 21 | /// - parameter source: Observable sequence that represents sequence of elements for the key 22 | /// - returns: Grouped observable sequence of elements for the specific key 23 | public init(key: Key, source: Observable) { 24 | self.key = key 25 | self.source = source 26 | } 27 | 28 | /// Subscribes `observer` to receive events for this sequence. 29 | public func subscribe(_ observer: O) -> Disposable where O.E == E { 30 | return self.source.subscribe(observer) 31 | } 32 | 33 | /// Converts `self` to `Observable` sequence. 34 | public func asObservable() -> Observable { 35 | return source 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Schedulers/ImmediateScheduler.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImmediateScheduler.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 10/17/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | /// Represents an object that schedules units of work to run immediately on the current thread. 10 | private final class ImmediateScheduler : ImmediateSchedulerType { 11 | 12 | private let _asyncLock = AsyncLock() 13 | 14 | /** 15 | Schedules an action to be executed immediately. 16 | 17 | In case `schedule` is called recursively from inside of `action` callback, scheduled `action` will be enqueued 18 | and executed after current `action`. (`AsyncLock` behavior) 19 | 20 | - parameter state: State passed to the action to be executed. 21 | - parameter action: Action to be executed. 22 | - returns: The disposable object used to cancel the scheduled action (best effort). 23 | */ 24 | func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { 25 | let disposable = SingleAssignmentDisposable() 26 | _asyncLock.invoke(AnonymousInvocable { 27 | if disposable.isDisposed { 28 | return 29 | } 30 | disposable.setDisposable(action(state)) 31 | }) 32 | 33 | return disposable 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /LaunchHelper/LaunchHelper/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // LaunchHelper 4 | // 5 | // Created by 邱宇舟 on 2017/3/28. 6 | // Copyright © 2017年 qiuyuzhou. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @property (weak) IBOutlet NSWindow *window; 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { 19 | // Insert code here to initialize your application 20 | NSLog(@"ShadowsocksX-NG LaunchHelper"); 21 | 22 | NSWorkspace* ws = [NSWorkspace sharedWorkspace]; 23 | BOOL bLaunched = NO; 24 | bLaunched = [ws launchApplication: @"/Applications/ShadowsocksX-NG.app"]; 25 | if (!bLaunched) { 26 | bLaunched = [ws launchApplication: @"ShadowsocksX-NG.app"]; 27 | } 28 | if (!bLaunched) { 29 | NSArray *pathComponents = [[[NSBundle mainBundle] bundlePath] pathComponents]; 30 | pathComponents = [pathComponents subarrayWithRange:NSMakeRange(0, [pathComponents count] - 4)]; 31 | NSString *path = [NSString pathWithComponents:pathComponents]; 32 | [[NSWorkspace sharedWorkspace] launchApplication:path]; 33 | } 34 | [NSApp terminate:nil]; 35 | } 36 | 37 | 38 | - (void)applicationWillTerminate:(NSNotification *)aNotification { 39 | // Insert code here to tear down your application 40 | } 41 | 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/zh-Hans.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | /* 8 | * SHARED STRINGS 9 | */ 10 | 11 | /* 12 | * ./PACUtils.swift 13 | */ 14 | 15 | "PAC has been updated by latest GFW List." = "已经使用最新的 GFW List 更新PAC"; 16 | 17 | "Failed to download latest GFW List." = "下载 GFW List 失败"; 18 | 19 | /* 20 | * ./PreferencesWindowController.swift 21 | */ 22 | 23 | "New Server" = "新服务器"; 24 | 25 | /* 26 | * ./AppDelegate.swift 27 | */ 28 | 29 | "Add Shadowsocks Server Profile" = "已添加新Shadowsocks服务器配置"; 30 | 31 | "By scan QR Code" = "通过扫描二维码"; 32 | 33 | " Encription Method: \(profile.method)" = " 加密方法: \(profile.method)"; 34 | 35 | "Current server profile is not valid." = "当前服务器配置无效"; 36 | 37 | "No current server profile." = "未设置当前服务器配置"; 38 | 39 | "Shadowsocks: On" = "Shadowsocks: On"; 40 | 41 | "Turn Shadowsocks Off" = "关闭 Shadowsocks"; 42 | 43 | "Shadowsocks: Off" = "Shadowsocks: Off"; 44 | 45 | "Turn Shadowsocks On" = "打开 Shadowsocks"; 46 | 47 | "Proxy - Auto By PAC" = "代理 - PAC自动(⌃⌘P)"; 48 | 49 | "Proxy - Global" = "代理 - 全局(⌃⌘P)"; 50 | 51 | "Proxy - Manual" = "代理 - 手动"; 52 | 53 | "Servers" = "服务器"; 54 | 55 | "Auto" = "自动"; 56 | 57 | "Global" = "全局"; 58 | 59 | "Manual" = "手动"; 60 | 61 | "Show Running Mode On Status Bar" = "在状态栏显示运行模式"; 62 | 63 | /* 64 | * ./HTTPPreferencesWindowController.swift 65 | */ 66 | 67 | "Export Command Copied." = "Export 命令已复制至剪贴板"; 68 | 69 | "Timeout" = "超时"; 70 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-proxy_conf_helper/Pods-proxy_conf_helper-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## BRLOptionParser 5 | 6 | (The MIT License) 7 | 8 | Copyright © 2013-2015 Stephen Celis () 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy of 11 | this software and associated documentation files (the "Software"), to deal in 12 | the Software without restriction, including without limitation the rights to 13 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 14 | of the Software, and to permit persons to whom the Software is furnished to do 15 | so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | 29 | Generated by CocoaPods - https://cocoapods.org 30 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Observables/StartWith.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StartWith.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 4/6/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | extension ObservableType { 10 | 11 | /** 12 | Prepends a sequence of values to an observable sequence. 13 | 14 | - seealso: [startWith operator on reactivex.io](http://reactivex.io/documentation/operators/startwith.html) 15 | 16 | - parameter elements: Elements to prepend to the specified sequence. 17 | - returns: The source sequence prepended with the specified values. 18 | */ 19 | public func startWith(_ elements: E ...) 20 | -> Observable { 21 | return StartWith(source: self.asObservable(), elements: elements) 22 | } 23 | } 24 | 25 | final fileprivate class StartWith: Producer { 26 | let elements: [Element] 27 | let source: Observable 28 | 29 | init(source: Observable, elements: [Element]) { 30 | self.source = source 31 | self.elements = elements 32 | super.init() 33 | } 34 | 35 | override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { 36 | for e in elements { 37 | observer.on(.next(e)) 38 | } 39 | 40 | return (sink: Disposables.create(), subscription: source.subscribe(observer)) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/Base.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | * SHARED STRINGS 3 | */ 4 | 5 | /* 6 | * ./PACUtils.swift 7 | */ 8 | 9 | "PAC has been updated by latest GFW List." = "PAC has been updated by latest GFW List."; 10 | 11 | "Failed to download latest GFW List." = "Failed to download latest GFW List."; 12 | 13 | /* 14 | * ./PreferencesWindowController.swift 15 | */ 16 | 17 | "New Server" = "New Server"; 18 | 19 | /* 20 | * ./AppDelegate.swift 21 | */ 22 | 23 | "Add Shadowsocks Server Profile" = "Add Shadowsocks Server Profile"; 24 | 25 | "By scan QR Code" = "By scan QR Code"; 26 | 27 | "By Handle SS URL" = "By Handle SS URL"; 28 | 29 | " Encryption Method: \(profile.method)" = " Encryption Method: \(profile.method)"; 30 | 31 | "Current server profile is not valid." = "Current server profile is not valid."; 32 | 33 | "No current server profile." = "No current server profile."; 34 | 35 | "Shadowsocks: On" = "Shadowsocks: On"; 36 | 37 | "Turn Shadowsocks Off" = "Turn Shadowsocks Off"; 38 | 39 | "Shadowsocks: Off" = "Shadowsocks: Off"; 40 | 41 | "Turn Shadowsocks On" = "Turn Shadowsocks On"; 42 | 43 | "Proxy - Auto By PAC" = "Proxy - Auto By PAC"; 44 | 45 | "Proxy - Global" = "Proxy - Global"; 46 | 47 | "Proxy - Manual" = "Proxy - Manual"; 48 | 49 | "Servers" = "Servers"; 50 | 51 | "Auto" = "PAC"; 52 | 53 | "Global" = "Global"; 54 | 55 | "Manual" = "Manual"; 56 | 57 | "Show Running Mode On Status Bar" = "Show Running Mode On Status Bar"; 58 | 59 | "Timeout" = "Timeout"; 60 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/LaunchAtLoginController.h: -------------------------------------------------------------------------------- 1 | // 2 | // LaunchAtLoginController.h 3 | // 4 | // Copyright 2011 Tomáš Znamenáček 5 | // Copyright 2010 Ben Clark-Robinson 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining 8 | // a copy of this software and associated documentation files (the ‘Software’), 9 | // to deal in the Software without restriction, including without limitation 10 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 11 | // and/or sell copies of the Software, and to permit persons to whom the 12 | // Software is furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be 15 | // included in all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, 18 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | #import 25 | 26 | @interface LaunchAtLoginController : NSObject 27 | 28 | @property(assign) BOOL launchAtLogin; 29 | 30 | + (instancetype) shared; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/en.lproj/PreferencesWindowController.strings: -------------------------------------------------------------------------------- 1 | 2 | /* Class = "NSTextFieldCell"; title = "Text"; ObjectID = "COZ-Qr-bmU"; */ 3 | "COZ-Qr-bmU.title" = "Text"; 4 | 5 | /* Class = "NSWindow"; title = "Server Preferences"; ObjectID = "F0z-JX-Cv5"; */ 6 | "F0z-JX-Cv5.title" = "Server Preferences"; 7 | 8 | /* Class = "NSBox"; title = "Box"; ObjectID = "Gqv-5O-Wwf"; */ 9 | "Gqv-5O-Wwf.title" = "Box"; 10 | 11 | /* Class = "NSTextFieldCell"; title = ":"; ObjectID = "Ibr-Gs-5Js"; */ 12 | "Ibr-Gs-5Js.title" = ":"; 13 | 14 | /* Class = "NSTextFieldCell"; title = "Remarks:"; ObjectID = "MiN-VE-FtC"; */ 15 | "MiN-VE-FtC.title" = "Remarks:"; 16 | 17 | /* Class = "NSButtonCell"; title = "Enable OTA"; ObjectID = "hRZ-Rp-I5e"; */ 18 | "hRZ-Rp-I5e.title" = "Enable OTA"; 19 | 20 | /* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "j03-9E-uHW"; */ 21 | "j03-9E-uHW.title" = "Cancel"; 22 | 23 | /* Class = "NSTextFieldCell"; title = "Password:"; ObjectID = "kil-xC-HPD"; */ 24 | "kil-xC-HPD.title" = "Password:"; 25 | 26 | /* Class = "NSTextFieldCell"; title = "Encryption:"; ObjectID = "mOh-nD-7EX"; */ 27 | "mOh-nD-7EX.title" = "Encryption:"; 28 | 29 | /* Class = "NSButtonCell"; title = "Copy URL to Clipboard"; ObjectID = "t3T-Kd-5La"; */ 30 | "t3T-Kd-5La.title" = "Copy URL to Clipboard"; 31 | 32 | /* Class = "NSTextFieldCell"; title = "Address:"; ObjectID = "yHs-XE-XEB"; */ 33 | "yHs-XE-XEB.title" = "Address:"; 34 | 35 | /* Class = "NSButtonCell"; title = "OK"; ObjectID = "zPE-oD-PwK"; */ 36 | "zPE-oD-PwK.title" = "OK"; 37 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Bag+Rx.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 10/19/16. 6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | 10 | // MARK: forEach 11 | 12 | @inline(__always) 13 | func dispatch(_ bag: Bag<(Event) -> ()>, _ event: Event) { 14 | if bag._onlyFastPath { 15 | bag._value0?(event) 16 | return 17 | } 18 | 19 | let value0 = bag._value0 20 | let dictionary = bag._dictionary 21 | 22 | if let value0 = value0 { 23 | value0(event) 24 | } 25 | 26 | let pairs = bag._pairs 27 | for i in 0 ..< pairs.count { 28 | pairs[i].value(event) 29 | } 30 | 31 | if let dictionary = dictionary { 32 | for element in dictionary.values { 33 | element(event) 34 | } 35 | } 36 | } 37 | 38 | /// Dispatches `dispose` to all disposables contained inside bag. 39 | func disposeAll(in bag: Bag) { 40 | if bag._onlyFastPath { 41 | bag._value0?.dispose() 42 | return 43 | } 44 | 45 | let value0 = bag._value0 46 | let dictionary = bag._dictionary 47 | 48 | if let value0 = value0 { 49 | value0.dispose() 50 | } 51 | 52 | let pairs = bag._pairs 53 | for i in 0 ..< pairs.count { 54 | pairs[i].value.dispose() 55 | } 56 | 57 | if let dictionary = dictionary { 58 | for element in dictionary.values { 59 | element.dispose() 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Observables/AddRef.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AddRef.swift 3 | // RxSwift 4 | // 5 | // Created by Junior B. on 30/10/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | final class AddRefSink : Sink, ObserverType { 10 | typealias Element = O.E 11 | 12 | override init(observer: O, cancel: Cancelable) { 13 | super.init(observer: observer, cancel: cancel) 14 | } 15 | 16 | func on(_ event: Event) { 17 | switch event { 18 | case .next(_): 19 | forwardOn(event) 20 | case .completed, .error(_): 21 | forwardOn(event) 22 | dispose() 23 | } 24 | } 25 | } 26 | 27 | final class AddRef : Producer { 28 | typealias EventHandler = (Event) throws -> Void 29 | 30 | private let _source: Observable 31 | private let _refCount: RefCountDisposable 32 | 33 | init(source: Observable, refCount: RefCountDisposable) { 34 | _source = source 35 | _refCount = refCount 36 | } 37 | 38 | override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { 39 | let releaseDisposable = _refCount.retain() 40 | let sink = AddRefSink(observer: observer, cancel: cancel) 41 | let subscription = Disposables.create(releaseDisposable, _source.subscribe(sink)) 42 | 43 | return (sink: sink, subscription: subscription) 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Observables/AsMaybe.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AsMaybe.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 3/12/17. 6 | // Copyright © 2017 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | fileprivate final class AsMaybeSink : Sink, ObserverType { 10 | typealias ElementType = O.E 11 | typealias E = ElementType 12 | 13 | private var _element: Event? = nil 14 | 15 | func on(_ event: Event) { 16 | switch event { 17 | case .next: 18 | if _element != nil { 19 | forwardOn(.error(RxError.moreThanOneElement)) 20 | dispose() 21 | } 22 | 23 | _element = event 24 | case .error: 25 | forwardOn(event) 26 | dispose() 27 | case .completed: 28 | if let element = _element { 29 | forwardOn(element) 30 | } 31 | forwardOn(.completed) 32 | dispose() 33 | } 34 | } 35 | } 36 | 37 | final class AsMaybe: Producer { 38 | fileprivate let _source: Observable 39 | 40 | init(source: Observable) { 41 | _source = source 42 | } 43 | 44 | override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { 45 | let sink = AsMaybeSink(observer: observer, cancel: cancel) 46 | let subscription = _source.subscribe(sink) 47 | return (sink: sink, subscription: subscription) 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Pods/GCDWebServer/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012-2014, Pierre-Olivier Latour 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * The name of Pierre-Olivier Latour may not be used to endorse 12 | or promote products derived from this software without specific 13 | prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL PIERRE-OLIVIER LATOUR BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/macOS/NSImageView+Rx.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSImageView+Rx.swift 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 5/17/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | #if os(macOS) 10 | 11 | #if !RX_NO_MODULE 12 | import RxSwift 13 | #endif 14 | import Cocoa 15 | 16 | extension Reactive where Base: NSImageView { 17 | 18 | /// Bindable sink for `image` property. 19 | public var image: UIBindingObserver { 20 | return image(transitionType: nil) 21 | } 22 | 23 | /// Bindable sink for `image` property. 24 | /// 25 | /// - parameter transitionType: Optional transition type while setting the image (kCATransitionFade, kCATransitionMoveIn, ...) 26 | public func image(transitionType: String? = nil) -> UIBindingObserver { 27 | return UIBindingObserver(UIElement: self.base) { control, value in 28 | if let transitionType = transitionType { 29 | if value != nil { 30 | let transition = CATransition() 31 | transition.duration = 0.25 32 | transition.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut) 33 | transition.type = transitionType 34 | control.layer?.add(transition, forKey: kCATransition) 35 | } 36 | } 37 | else { 38 | control.layer?.removeAllAnimations() 39 | } 40 | control.image = value 41 | } 42 | } 43 | } 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImmediateSchedulerType.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 5/31/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | /// Represents an object that immediately schedules units of work. 10 | public protocol ImmediateSchedulerType { 11 | /** 12 | Schedules an action to be executed immediately. 13 | 14 | - parameter state: State passed to the action to be executed. 15 | - parameter action: Action to be executed. 16 | - returns: The disposable object used to cancel the scheduled action (best effort). 17 | */ 18 | func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable 19 | } 20 | 21 | extension ImmediateSchedulerType { 22 | /** 23 | Schedules an action to be executed recursively. 24 | 25 | - parameter state: State passed to the action to be executed. 26 | - parameter action: Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in recursive invocation state. 27 | - returns: The disposable object used to cancel the scheduled action (best effort). 28 | */ 29 | public func scheduleRecursive(_ state: State, action: @escaping (_ state: State, _ recurse: (State) -> ()) -> ()) -> Disposable { 30 | let recursiveScheduler = RecursiveImmediateScheduler(action: action, scheduler: self) 31 | 32 | recursiveScheduler.schedule(state) 33 | 34 | return Disposables.create(with: recursiveScheduler.dispose) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "Icon_16x16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "Icon_16x16@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "Icon_32x32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "Icon_32x32@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "Icon_128x128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "Icon_128x128@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "Icon_256x256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "Icon_256x256@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "Icon_512x512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "Icon_512x512@2x.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Observables/AsSingle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AsSingle.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 3/12/17. 6 | // Copyright © 2017 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | fileprivate final class AsSingleSink : Sink, ObserverType { 10 | typealias ElementType = O.E 11 | typealias E = ElementType 12 | 13 | private var _element: Event? = nil 14 | 15 | func on(_ event: Event) { 16 | switch event { 17 | case .next: 18 | if _element != nil { 19 | forwardOn(.error(RxError.moreThanOneElement)) 20 | dispose() 21 | } 22 | 23 | _element = event 24 | case .error: 25 | forwardOn(event) 26 | dispose() 27 | case .completed: 28 | if let element = _element { 29 | forwardOn(element) 30 | forwardOn(.completed) 31 | } 32 | else { 33 | forwardOn(.error(RxError.noElements)) 34 | } 35 | dispose() 36 | } 37 | } 38 | } 39 | 40 | final class AsSingle: Producer { 41 | fileprivate let _source: Observable 42 | 43 | init(source: Observable) { 44 | _source = source 45 | } 46 | 47 | override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { 48 | let sink = AsSingleSink(observer: observer, cancel: cancel) 49 | let subscription = _source.subscribe(sink) 50 | return (sink: sink, subscription: subscription) 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx+KVORepresentable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+Rx+KVORepresentable.swift 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 11/14/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | #if !os(Linux) 10 | 11 | import Foundation.NSObject 12 | #if !RX_NO_MODULE 13 | import RxSwift 14 | #endif 15 | 16 | extension Reactive where Base: NSObject { 17 | 18 | /** 19 | Specialization of generic `observe` method. 20 | 21 | This is a special overload because to observe values of some type (for example `Int`), first values of KVO type 22 | need to be observed (`NSNumber`), and then converted to result type. 23 | 24 | For more information take a look at `observe` method. 25 | */ 26 | public func observe(_ type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.new, .initial], retainSelf: Bool = true) -> Observable { 27 | return observe(E.KVOType.self, keyPath, options: options, retainSelf: retainSelf) 28 | .map(E.init) 29 | } 30 | } 31 | 32 | #if !DISABLE_SWIZZLING && !os(Linux) 33 | // KVO 34 | extension Reactive where Base: NSObject { 35 | /** 36 | Specialization of generic `observeWeakly` method. 37 | 38 | For more information take a look at `observeWeakly` method. 39 | */ 40 | public func observeWeakly(_ type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.new, .initial]) -> Observable { 41 | return observeWeakly(E.KVOType.self, keyPath, options: options) 42 | .map(E.init) 43 | } 44 | } 45 | #endif 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/Runtime/_RXKVOObserver.m: -------------------------------------------------------------------------------- 1 | // 2 | // _RXKVOObserver.m 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 7/11/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | #import "include/_RXKVOObserver.h" 10 | 11 | @interface _RXKVOObserver () 12 | 13 | @property (nonatomic, unsafe_unretained) id target; 14 | @property (nonatomic, strong ) id retainedTarget; 15 | @property (nonatomic, copy ) NSString *keyPath; 16 | @property (nonatomic, copy ) void (^callback)(id); 17 | 18 | @end 19 | 20 | @implementation _RXKVOObserver 21 | 22 | -(instancetype)initWithTarget:(id)target 23 | retainTarget:(BOOL)retainTarget 24 | keyPath:(NSString*)keyPath 25 | options:(NSKeyValueObservingOptions)options 26 | callback:(void (^)(id))callback { 27 | self = [super init]; 28 | if (!self) return nil; 29 | 30 | self.target = target; 31 | if (retainTarget) { 32 | self.retainedTarget = target; 33 | } 34 | self.keyPath = keyPath; 35 | self.callback = callback; 36 | 37 | [self.target addObserver:self forKeyPath:self.keyPath options:options context:nil]; 38 | 39 | return self; 40 | } 41 | 42 | -(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { 43 | @synchronized(self) { 44 | self.callback(change[NSKeyValueChangeNewKey]); 45 | } 46 | } 47 | 48 | -(void)dispose { 49 | [self.target removeObserver:self forKeyPath:self.keyPath context:nil]; 50 | self.target = nil; 51 | self.retainedTarget = nil; 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Observables/Materialize.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Materialize.swift 3 | // RxSwift 4 | // 5 | // Created by sergdort on 08/03/2017. 6 | // Copyright © 2017 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | extension ObservableType { 10 | /** 11 | Convert any Observable into an Observable of its events. 12 | - seealso: [materialize operator on reactivex.io](http://reactivex.io/documentation/operators/materialize-dematerialize.html) 13 | - returns: An observable sequence that wraps events in an Event. The returned Observable never errors, but it does complete after observing all of the events of the underlying Observable. 14 | */ 15 | public func materialize() -> Observable> { 16 | return Materialize(source: self.asObservable()) 17 | } 18 | } 19 | 20 | fileprivate final class MaterializeSink: Sink, ObserverType where O.E == Event { 21 | 22 | func on(_ event: Event) { 23 | forwardOn(.next(event)) 24 | if event.isStopEvent { 25 | forwardOn(.completed) 26 | dispose() 27 | } 28 | } 29 | } 30 | 31 | final fileprivate class Materialize: Producer> { 32 | private let _source: Observable 33 | 34 | init(source: Observable) { 35 | _source = source 36 | } 37 | 38 | override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { 39 | let sink = MaterializeSink(observer: observer, cancel: cancel) 40 | let subscription = _source.subscribe(sink) 41 | 42 | return (sink: sink, subscription: subscription) 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Pods/MASShortcut/Framework/MASKeyCodes.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "MASKeyMasks.h" 4 | 5 | // These glyphs are missed in Carbon.h 6 | enum { 7 | kMASShortcutGlyphEject = 0x23CF, 8 | kMASShortcutGlyphClear = 0x2715, 9 | kMASShortcutGlyphDeleteLeft = 0x232B, 10 | kMASShortcutGlyphDeleteRight = 0x2326, 11 | kMASShortcutGlyphLeftArrow = 0x2190, 12 | kMASShortcutGlyphRightArrow = 0x2192, 13 | kMASShortcutGlyphUpArrow = 0x2191, 14 | kMASShortcutGlyphDownArrow = 0x2193, 15 | kMASShortcutGlyphEscape = 0x238B, 16 | kMASShortcutGlyphHelp = 0x003F, 17 | kMASShortcutGlyphPageDown = 0x21DF, 18 | kMASShortcutGlyphPageUp = 0x21DE, 19 | kMASShortcutGlyphTabRight = 0x21E5, 20 | kMASShortcutGlyphReturn = 0x2305, 21 | kMASShortcutGlyphReturnR2L = 0x21A9, 22 | kMASShortcutGlyphPadClear = 0x2327, 23 | kMASShortcutGlyphNorthwestArrow = 0x2196, 24 | kMASShortcutGlyphSoutheastArrow = 0x2198, 25 | }; 26 | 27 | NS_INLINE NSString* NSStringFromMASKeyCode(unsigned short ch) 28 | { 29 | return [NSString stringWithFormat:@"%C", ch]; 30 | } 31 | 32 | NS_INLINE NSUInteger MASPickCocoaModifiers(NSUInteger flags) 33 | { 34 | return (flags & (NSEventModifierFlagControl | NSEventModifierFlagShift | NSEventModifierFlagOption | NSEventModifierFlagCommand)); 35 | } 36 | 37 | NS_INLINE UInt32 MASCarbonModifiersFromCocoaModifiers(NSUInteger cocoaFlags) 38 | { 39 | return 40 | (cocoaFlags & NSEventModifierFlagCommand ? cmdKey : 0) 41 | | (cocoaFlags & NSEventModifierFlagOption ? optionKey : 0) 42 | | (cocoaFlags & NSEventModifierFlagControl ? controlKey : 0) 43 | | (cocoaFlags & NSEventModifierFlagShift ? shiftKey : 0); 44 | } 45 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Errors.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Errors.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 3/28/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | let RxErrorDomain = "RxErrorDomain" 10 | let RxCompositeFailures = "RxCompositeFailures" 11 | 12 | /// Generic Rx error codes. 13 | public enum RxError 14 | : Swift.Error 15 | , CustomDebugStringConvertible { 16 | /// Unknown error occurred. 17 | case unknown 18 | /// Performing an action on disposed object. 19 | case disposed(object: AnyObject) 20 | /// Aritmetic overflow error. 21 | case overflow 22 | /// Argument out of range error. 23 | case argumentOutOfRange 24 | /// Sequence doesn't contain any elements. 25 | case noElements 26 | /// Sequence contains more than one element. 27 | case moreThanOneElement 28 | /// Timeout error. 29 | case timeout 30 | } 31 | 32 | extension RxError { 33 | /// A textual representation of `self`, suitable for debugging. 34 | public var debugDescription: String { 35 | switch self { 36 | case .unknown: 37 | return "Unknown error occurred." 38 | case .disposed(let object): 39 | return "Object `\(object)` was already disposed." 40 | case .overflow: 41 | return "Arithmetic overflow occurred." 42 | case .argumentOutOfRange: 43 | return "Argument out of range." 44 | case .noElements: 45 | return "Sequence doesn't contain any elements." 46 | case .moreThanOneElement: 47 | return "Sequence contains more than one element." 48 | case .timeout: 49 | return "Sequence timeout." 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ScheduledDisposable.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 6/13/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | private let disposeScheduledDisposable: (ScheduledDisposable) -> Disposable = { sd in 10 | sd.disposeInner() 11 | return Disposables.create() 12 | } 13 | 14 | /// Represents a disposable resource whose disposal invocation will be scheduled on the specified scheduler. 15 | public final class ScheduledDisposable : Cancelable { 16 | public let scheduler: ImmediateSchedulerType 17 | 18 | private var _isDisposed: AtomicInt = 0 19 | 20 | // state 21 | private var _disposable: Disposable? 22 | 23 | /// - returns: Was resource disposed. 24 | public var isDisposed: Bool { 25 | return _isDisposed == 1 26 | } 27 | 28 | /** 29 | Initializes a new instance of the `ScheduledDisposable` that uses a `scheduler` on which to dispose the `disposable`. 30 | 31 | - parameter scheduler: Scheduler where the disposable resource will be disposed on. 32 | - parameter disposable: Disposable resource to dispose on the given scheduler. 33 | */ 34 | public init(scheduler: ImmediateSchedulerType, disposable: Disposable) { 35 | self.scheduler = scheduler 36 | _disposable = disposable 37 | } 38 | 39 | /// Disposes the wrapped disposable on the provided scheduler. 40 | public func dispose() { 41 | let _ = scheduler.schedule(self, action: disposeScheduledDisposable) 42 | } 43 | 44 | func disposeInner() { 45 | if AtomicCompareAndSwap(0, 1, &_isDisposed) { 46 | _disposable!.dispose() 47 | _disposable = nil 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.7.1 21 | CFBundleSignature 22 | ???? 23 | CFBundleURLTypes 24 | 25 | 26 | CFBundleTypeRole 27 | Viewer 28 | CFBundleURLIconFile 29 | menu_icon@2x 30 | CFBundleURLName 31 | shadowsocks 32 | CFBundleURLSchemes 33 | 34 | ss 35 | 36 | 37 | 38 | CFBundleVersion 39 | 1 40 | LSApplicationCategoryType 41 | public.app-category.utilities 42 | LSMinimumSystemVersion 43 | $(MACOSX_DEPLOYMENT_TARGET) 44 | LSUIElement 45 | 46 | NSHumanReadableCopyright 47 | Copyright © 2016-2017 qiuyuzhou. All rights reserved. License GPLv3. 48 | NSMainNibFile 49 | MainMenu 50 | NSPrincipalClass 51 | SWBApplication 52 | 53 | 54 | -------------------------------------------------------------------------------- /Pods/MASShortcut/Framework/MASDictionaryTransformer.m: -------------------------------------------------------------------------------- 1 | #import "MASDictionaryTransformer.h" 2 | #import "MASShortcut.h" 3 | 4 | NSString *const MASDictionaryTransformerName = @"MASDictionaryTransformer"; 5 | 6 | static NSString *const MASKeyCodeKey = @"keyCode"; 7 | static NSString *const MASModifierFlagsKey = @"modifierFlags"; 8 | 9 | @implementation MASDictionaryTransformer 10 | 11 | + (BOOL) allowsReverseTransformation 12 | { 13 | return YES; 14 | } 15 | 16 | // Storing nil values as an empty dictionary lets us differ between 17 | // “not available, use default value” and “explicitly set to none”. 18 | // See http://stackoverflow.com/questions/5540760 for details. 19 | - (NSDictionary*) reverseTransformedValue: (MASShortcut*) shortcut 20 | { 21 | if (shortcut == nil) { 22 | return [NSDictionary dictionary]; 23 | } else { 24 | return @{ 25 | MASKeyCodeKey: @([shortcut keyCode]), 26 | MASModifierFlagsKey: @([shortcut modifierFlags]) 27 | }; 28 | } 29 | } 30 | 31 | - (MASShortcut*) transformedValue: (NSDictionary*) dictionary 32 | { 33 | // We have to be defensive here as the value may come from user defaults. 34 | if (![dictionary isKindOfClass:[NSDictionary class]]) { 35 | return nil; 36 | } 37 | 38 | id keyCodeBox = [dictionary objectForKey:MASKeyCodeKey]; 39 | id modifierFlagsBox = [dictionary objectForKey:MASModifierFlagsKey]; 40 | 41 | SEL integerValue = @selector(integerValue); 42 | if (![keyCodeBox respondsToSelector:integerValue] || ![modifierFlagsBox respondsToSelector:integerValue]) { 43 | return nil; 44 | } 45 | 46 | return [MASShortcut 47 | shortcutWithKeyCode:[keyCodeBox integerValue] 48 | modifierFlags:[modifierFlagsBox integerValue]]; 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BinaryDisposable.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 6/12/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | /// Represents two disposable resources that are disposed together. 10 | private final class BinaryDisposable : DisposeBase, Cancelable { 11 | 12 | private var _isDisposed: AtomicInt = 0 13 | 14 | // state 15 | private var _disposable1: Disposable? 16 | private var _disposable2: Disposable? 17 | 18 | /// - returns: Was resource disposed. 19 | var isDisposed: Bool { 20 | return _isDisposed > 0 21 | } 22 | 23 | /// Constructs new binary disposable from two disposables. 24 | /// 25 | /// - parameter disposable1: First disposable 26 | /// - parameter disposable2: Second disposable 27 | init(_ disposable1: Disposable, _ disposable2: Disposable) { 28 | _disposable1 = disposable1 29 | _disposable2 = disposable2 30 | super.init() 31 | } 32 | 33 | /// Calls the disposal action if and only if the current instance hasn't been disposed yet. 34 | /// 35 | /// After invoking disposal action, disposal action will be dereferenced. 36 | func dispose() { 37 | if AtomicCompareAndSwap(0, 1, &_isDisposed) { 38 | _disposable1?.dispose() 39 | _disposable2?.dispose() 40 | _disposable1 = nil 41 | _disposable2 = nil 42 | } 43 | } 44 | } 45 | 46 | extension Disposables { 47 | 48 | /// Creates a disposable with the given disposables. 49 | public static func create(_ disposable1: Disposable, _ disposable2: Disposable) -> Cancelable { 50 | return BinaryDisposable(disposable1, disposable2) 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /Pods/MASShortcut/Framework/MASShortcutView+Bindings.m: -------------------------------------------------------------------------------- 1 | #import "MASShortcutView+Bindings.h" 2 | 3 | @implementation MASShortcutView (Bindings) 4 | 5 | - (NSString*) associatedUserDefaultsKey 6 | { 7 | NSDictionary* bindingInfo = [self infoForBinding:MASShortcutBinding]; 8 | if (bindingInfo != nil) { 9 | NSString *keyPath = [bindingInfo objectForKey:NSObservedKeyPathKey]; 10 | NSString *key = [keyPath stringByReplacingOccurrencesOfString:@"values." withString:@""]; 11 | return key; 12 | } else { 13 | return nil; 14 | } 15 | } 16 | 17 | - (void) setAssociatedUserDefaultsKey: (NSString*) newKey withTransformer: (NSValueTransformer*) transformer 18 | { 19 | // Break previous binding if any 20 | NSString *currentKey = [self associatedUserDefaultsKey]; 21 | if (currentKey != nil) { 22 | [self unbind:currentKey]; 23 | } 24 | 25 | // Stop if the new binding is nil 26 | if (newKey == nil) { 27 | return; 28 | } 29 | 30 | NSDictionary *options = transformer ? 31 | @{NSValueTransformerBindingOption:transformer} : 32 | nil; 33 | 34 | [self bind:MASShortcutBinding 35 | toObject:[NSUserDefaultsController sharedUserDefaultsController] 36 | withKeyPath:[@"values." stringByAppendingString:newKey] 37 | options:options]; 38 | } 39 | 40 | - (void) setAssociatedUserDefaultsKey: (NSString*) newKey withTransformerName: (NSString*) transformerName 41 | { 42 | [self setAssociatedUserDefaultsKey:newKey withTransformer:[NSValueTransformer valueTransformerForName:transformerName]]; 43 | } 44 | 45 | - (void) setAssociatedUserDefaultsKey: (NSString*) newKey 46 | { 47 | [self setAssociatedUserDefaultsKey:newKey withTransformerName:NSKeyedUnarchiveFromDataTransformerName]; 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/zh-Hans.lproj/PreferencesWindowController.strings: -------------------------------------------------------------------------------- 1 | 2 | /* Class = "NSTextFieldCell"; title = "Text"; ObjectID = "COZ-Qr-bmU"; */ 3 | "COZ-Qr-bmU.title" = "Text"; 4 | 5 | /* Class = "NSWindow"; title = "Server Preferences"; ObjectID = "F0z-JX-Cv5"; */ 6 | "F0z-JX-Cv5.title" = "服务器设置"; 7 | 8 | /* Class = "NSBox"; title = "Box"; ObjectID = "Gqv-5O-Wwf"; */ 9 | "Gqv-5O-Wwf.title" = "Box"; 10 | 11 | /* Class = "NSTextFieldCell"; title = ":"; ObjectID = "Ibr-Gs-5Js"; */ 12 | "Ibr-Gs-5Js.title" = ":"; 13 | 14 | /* Class = "NSTextFieldCell"; title = "Remarks:"; ObjectID = "MiN-VE-FtC"; */ 15 | "MiN-VE-FtC.title" = "备注:"; 16 | 17 | /* Class = "NSButtonCell"; title = "Enable OTA"; ObjectID = "hRZ-Rp-I5e"; */ 18 | "hRZ-Rp-I5e.title" = "启用 OTA (被废弃)"; 19 | 20 | /* Class = "NSButtonCell"; title = "Cacnel"; ObjectID = "j03-9E-uHW"; */ 21 | "j03-9E-uHW.title" = "取消"; 22 | 23 | /* Class = "NSTextFieldCell"; title = "Password:"; ObjectID = "kil-xC-HPD"; */ 24 | "kil-xC-HPD.title" = "密码:"; 25 | 26 | /* Class = "NSTextFieldCell"; title = "Encryption:"; ObjectID = "mOh-nD-7EX"; */ 27 | "mOh-nD-7EX.title" = "加密方法:"; 28 | 29 | /* Class = "NSButtonCell"; title = "Copy URL to Clipboard"; ObjectID = "t3T-Kd-5La"; */ 30 | "t3T-Kd-5La.title" = "复制服务器URL到剪贴板"; 31 | 32 | /* Class = "NSTextFieldCell"; title = "Address:"; ObjectID = "yHs-XE-XEB"; */ 33 | "yHs-XE-XEB.title" = "地址:"; 34 | 35 | /* Class = "NSButtonCell"; title = "OK"; ObjectID = "zPE-oD-PwK"; */ 36 | "zPE-oD-PwK.title" = "确定"; 37 | 38 | /* Class = "NSMenuItem"; title = "Clone"; ObjectID = "bl9-lq-u9V"; */ 39 | "bl9-lq-u9V.title" = "克隆"; 40 | 41 | /* Class = "NSTextFieldCell"; title = "Plugin:"; ObjectID = "gDt-yZ-Mqs"; */ 42 | "gDt-yZ-Mqs.title" = "插件:"; 43 | 44 | /* Class = "NSTextFieldCell"; title = "Plugin Opts:"; ObjectID = "orT-7j-dxE"; */ 45 | "orT-7j-dxE.title" = "插件选项:"; 46 | -------------------------------------------------------------------------------- /Pods/MASShortcut/Framework/MASLocalization.m: -------------------------------------------------------------------------------- 1 | #import "MASLocalization.h" 2 | #import "MASShortcut.h" 3 | 4 | static NSString *const MASLocalizationTableName = @"Localizable"; 5 | static NSString *const MASPlaceholderLocalizationString = @"XXX"; 6 | 7 | // The CocoaPods trickery here is needed because when the code 8 | // is built as a part of CocoaPods, it won’t make a separate framework 9 | // and the Localized.strings file won’t be bundled correctly. 10 | // See https://github.com/shpakovski/MASShortcut/issues/74 11 | NSString *MASLocalizedString(NSString *key, NSString *comment) { 12 | static NSBundle *localizationBundle = nil; 13 | static dispatch_once_t onceToken; 14 | dispatch_once(&onceToken, ^{ 15 | NSBundle *frameworkBundle = [NSBundle bundleForClass:[MASShortcut class]]; 16 | // first we'll check if resources bundle was copied to MASShortcut framework bundle when !use_frameworks option is active 17 | NSURL *cocoaPodsBundleURL = [frameworkBundle URLForResource:@"MASShortcut" withExtension:@"bundle"]; 18 | if (cocoaPodsBundleURL) { 19 | localizationBundle = [NSBundle bundleWithURL: cocoaPodsBundleURL]; 20 | } else { 21 | // trying to fetch cocoapods bundle from main bundle 22 | cocoaPodsBundleURL = [[NSBundle mainBundle] URLForResource: @"MASShortcut" withExtension:@"bundle"]; 23 | if (cocoaPodsBundleURL) { 24 | localizationBundle = [NSBundle bundleWithURL: cocoaPodsBundleURL]; 25 | } else { 26 | // fallback to framework bundle 27 | localizationBundle = frameworkBundle; 28 | } 29 | } 30 | }); 31 | return [localizationBundle localizedStringForKey:key 32 | value:MASPlaceholderLocalizationString 33 | table:MASLocalizationTableName]; 34 | } 35 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/ObservableType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ObservableType.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 8/8/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | /// Represents a push style sequence. 10 | public protocol ObservableType : ObservableConvertibleType { 11 | /// Type of elements in sequence. 12 | associatedtype E 13 | 14 | /** 15 | Subscribes `observer` to receive events for this sequence. 16 | 17 | ### Grammar 18 | 19 | **Next\* (Error | Completed)?** 20 | 21 | * sequences can produce zero or more elements so zero or more `Next` events can be sent to `observer` 22 | * once an `Error` or `Completed` event is sent, the sequence terminates and can't produce any other elements 23 | 24 | It is possible that events are sent from different threads, but no two events can be sent concurrently to 25 | `observer`. 26 | 27 | ### Resource Management 28 | 29 | When sequence sends `Complete` or `Error` event all internal resources that compute sequence elements 30 | will be freed. 31 | 32 | To cancel production of sequence elements and free resources immediately, call `dispose` on returned 33 | subscription. 34 | 35 | - returns: Subscription for `observer` that can be used to cancel production of sequence elements and free resources. 36 | */ 37 | func subscribe(_ observer: O) -> Disposable where O.E == E 38 | } 39 | 40 | extension ObservableType { 41 | 42 | /// Default implementation of converting `ObservableType` to `Observable`. 43 | public func asObservable() -> Observable { 44 | // temporary workaround 45 | //return Observable.create(subscribe: self.subscribe) 46 | return Observable.create { o in 47 | return self.subscribe(o) 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Pods/MASShortcut/zh-Hans.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* Cancel action button in recording state */ 2 | "Cancel" = "取消"; 3 | 4 | /* Tooltip for non-empty shortcut button */ 5 | "Click to record new shortcut" = "点击以记录新快捷键"; 6 | 7 | /* Tooltip for hint button near the non-empty shortcut */ 8 | "Delete shortcut" = "删除快捷键"; 9 | 10 | /* VoiceOver title */ 11 | "keyboard shortcut" = "键盘快捷键"; 12 | 13 | /* Alert button when shortcut is already used */ 14 | "OK" = "好"; 15 | 16 | /* Empty shortcut button in normal state */ 17 | "Record Shortcut" = "记录快捷键"; 18 | 19 | /* VoiceOver: Shortcut cleared */ 20 | "Shortcut cleared" = "快捷键已清除"; 21 | 22 | /* VoiceOver: Shortcut set */ 23 | "Shortcut set" = "快捷键已设置"; 24 | 25 | /* Shortcut glyph name for SPACE key */ 26 | "Space" = "空格键"; 27 | 28 | /* Title for alert when shortcut is already used */ 29 | "The key combination %@ cannot be used" = "按键组合“%@”无法使用"; 30 | 31 | /* Message for alert when shortcut is already used by the system */ 32 | "This combination cannot be used because it is already used by a system-wide keyboard shortcut.\nIf you really want to use this key combination, most shortcuts can be changed in the Keyboard & Mouse panel in System Preferences." = "当前按键组合无法使用,因为它已经用作其他系统全局快捷键。\n如果您真的想使用这个按键组合,大部分系统全局快捷键能在“系统偏好设置”里的“键盘”和“鼠标”面板中重设。"; 33 | 34 | /* Message for alert when shortcut is already used */ 35 | "This shortcut cannot be used because it is already used by the menu item ‘%@’." = "当前快捷键无法使用,因为它已用作菜单项“%@”的快捷键。"; 36 | 37 | /* VoiceOver shortcut help */ 38 | "To record a new shortcut, click this button, and then type the new shortcut, or press delete to clear an existing shortcut." = "若要记录新的快捷键,单击此按钮,然后键入新的快捷键,或者按“delete键”删除已经存在的快捷键。"; 39 | 40 | /* Non-empty shortcut button in recording state */ 41 | "Type New Shortcut" = "键入新快捷键"; 42 | 43 | /* Empty shortcut button in recording state */ 44 | "Type Shortcut" = "键入快捷键"; 45 | 46 | /* Cancel action button for non-empty shortcut in recording state */ 47 | "Use Old Shortcut" = "还原快捷键"; 48 | -------------------------------------------------------------------------------- /Pods/MASShortcut/zh-Hant.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* Cancel action button in recording state */ 2 | "Cancel" = "取消"; 3 | 4 | /* Tooltip for non-empty shortcut button */ 5 | "Click to record new shortcut" = "點選以記錄新快捷鍵"; 6 | 7 | /* Tooltip for hint button near the non-empty shortcut */ 8 | "Delete shortcut" = "刪除快捷鍵"; 9 | 10 | /* VoiceOver title */ 11 | "keyboard shortcut" = "鍵盤快捷鍵"; 12 | 13 | /* Alert button when shortcut is already used */ 14 | "OK" = "好"; 15 | 16 | /* Empty shortcut button in normal state */ 17 | "Record Shortcut" = "記錄快捷鍵"; 18 | 19 | /* VoiceOver: Shortcut cleared */ 20 | "Shortcut cleared" = "快捷鍵已清除"; 21 | 22 | /* VoiceOver: Shortcut set */ 23 | "Shortcut set" = "快捷鍵已設定"; 24 | 25 | /* Shortcut glyph name for SPACE key */ 26 | "Space" = "空格鍵"; 27 | 28 | /* Title for alert when shortcut is already used */ 29 | "The key combination %@ cannot be used" = "按鍵組合“%@”無法使用"; 30 | 31 | /* Message for alert when shortcut is already used by the system */ 32 | "This combination cannot be used because it is already used by a system-wide keyboard shortcut.\nIf you really want to use this key combination, most shortcuts can be changed in the Keyboard & Mouse panel in System Preferences." = "當前按鍵組合無法使用,因為它已經用作其他系統全局快捷鍵。\n如果您真的想使用這個按鍵組合,大部分系統全局快捷鍵能在“系統偏好設定”裡的“鍵盤”和“滑鼠”面板中重設。"; 33 | 34 | /* Message for alert when shortcut is already used */ 35 | "This shortcut cannot be used because it is already used by the menu item ‘%@’." = "當前快捷鍵無法使用,因為它已用作選單項“%@”的快捷鍵。"; 36 | 37 | /* VoiceOver shortcut help */ 38 | "To record a new shortcut, click this button, and then type the new shortcut, or press delete to clear an existing shortcut." = "若要記錄新的快捷鍵,單擊此按鈕,然後鍵入新的快捷鍵,或者按“delete鍵”刪除已經存在的快捷鍵。"; 39 | 40 | /* Non-empty shortcut button in recording state */ 41 | "Type New Shortcut" = "鍵入新快捷鍵"; 42 | 43 | /* Empty shortcut button in recording state */ 44 | "Type Shortcut" = "鍵入快捷鍵"; 45 | 46 | /* Cancel action button for non-empty shortcut in recording state */ 47 | "Use Old Shortcut" = "還原快捷鍵"; 48 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Observables/Dematerialize.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Dematerialize.swift 3 | // RxSwift 4 | // 5 | // Created by Jamie Pinkham on 3/13/17. 6 | // Copyright © 2017 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | extension ObservableType where E: EventConvertible { 10 | /** 11 | Convert any previously materialized Observable into it's original form. 12 | - seealso: [materialize operator on reactivex.io](http://reactivex.io/documentation/operators/materialize-dematerialize.html) 13 | - returns: The dematerialized observable sequence. 14 | */ 15 | public func dematerialize() -> Observable { 16 | return Dematerialize(source: self.asObservable()) 17 | } 18 | 19 | } 20 | 21 | fileprivate final class DematerializeSink: Sink, ObserverType where O.E == Element.ElementType { 22 | fileprivate func on(_ event: Event) { 23 | switch event { 24 | case .next(let element): 25 | forwardOn(element.event) 26 | if element.event.isStopEvent { 27 | dispose() 28 | } 29 | case .completed: 30 | forwardOn(.completed) 31 | dispose() 32 | case .error(let error): 33 | forwardOn(.error(error)) 34 | dispose() 35 | } 36 | } 37 | } 38 | 39 | final fileprivate class Dematerialize: Producer { 40 | private let _source: Observable 41 | 42 | init(source: Observable) { 43 | _source = source 44 | } 45 | 46 | override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element.ElementType { 47 | let sink = DematerializeSink(observer: observer, cancel: cancel) 48 | let subscription = _source.subscribe(sink) 49 | return (sink: sink, subscription: subscription) 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx+RawRepresentable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+Rx+RawRepresentable.swift 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 11/9/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | #if !os(Linux) 10 | 11 | import Foundation.NSObject 12 | #if !RX_NO_MODULE 13 | import RxSwift 14 | #endif 15 | 16 | extension Reactive where Base: NSObject { 17 | /** 18 | Specialization of generic `observe` method. 19 | 20 | This specialization first observes `KVORepresentable` value and then converts it to `RawRepresentable` value. 21 | 22 | It is useful for observing bridged ObjC enum values. 23 | 24 | For more information take a look at `observe` method. 25 | */ 26 | public func observe(_ type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.new, .initial], retainSelf: Bool = true) -> Observable where E.RawValue: KVORepresentable { 27 | return observe(E.RawValue.KVOType.self, keyPath, options: options, retainSelf: retainSelf) 28 | .map(E.init) 29 | } 30 | } 31 | 32 | #if !DISABLE_SWIZZLING 33 | 34 | // observeWeakly + RawRepresentable 35 | extension Reactive where Base: NSObject { 36 | 37 | /** 38 | Specialization of generic `observeWeakly` method. 39 | 40 | This specialization first observes `KVORepresentable` value and then converts it to `RawRepresentable` value. 41 | 42 | It is useful for observing bridged ObjC enum values. 43 | 44 | For more information take a look at `observeWeakly` method. 45 | */ 46 | public func observeWeakly(_ type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.new, .initial]) -> Observable where E.RawValue: KVORepresentable { 47 | return observeWeakly(E.RawValue.KVOType.self, keyPath, options: options) 48 | .map(E.init) 49 | } 50 | } 51 | #endif 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/UserRulesController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UserRulesController.swift 3 | // ShadowsocksX-NG 4 | // 5 | // Created by 周斌佳 on 16/8/1. 6 | // Copyright © 2016年 qiuyuzhou. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class UserRulesController: NSWindowController { 12 | 13 | @IBOutlet var userRulesView: NSTextView! 14 | 15 | override func windowDidLoad() { 16 | super.windowDidLoad() 17 | 18 | let fileMgr = FileManager.default 19 | if !fileMgr.fileExists(atPath: PACUserRuleFilePath) { 20 | let src = Bundle.main.path(forResource: "user-rule", ofType: "txt") 21 | try! fileMgr.copyItem(atPath: src!, toPath: PACUserRuleFilePath) 22 | } 23 | 24 | let str = try? String(contentsOfFile: PACUserRuleFilePath, encoding: String.Encoding.utf8) 25 | userRulesView.string = str! 26 | } 27 | 28 | @IBAction func didCancel(_ sender: AnyObject) { 29 | window?.performClose(self) 30 | } 31 | 32 | @IBAction func didOK(_ sender: AnyObject) { 33 | if let str = userRulesView?.string { 34 | do { 35 | try str.data(using: String.Encoding.utf8)?.write(to: URL(fileURLWithPath: PACUserRuleFilePath), options: .atomic) 36 | 37 | if GeneratePACFile() { 38 | // Popup a user notification 39 | let notification = NSUserNotification() 40 | notification.title = "PAC has been updated by User Rules.".localized 41 | NSUserNotificationCenter.default 42 | .deliver(notification) 43 | } else { 44 | let notification = NSUserNotification() 45 | notification.title = "It's failed to update PAC by User Rules.".localized 46 | NSUserNotificationCenter.default 47 | .deliver(notification) 48 | } 49 | } catch {} 50 | } 51 | window?.performClose(self) 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /ShadowsocksX-NG/SWBApplication.m: -------------------------------------------------------------------------------- 1 | // 2 | // Created by clowwindy on 3/1/14. 3 | // Copyright (c) 2014 clowwindy. All rights reserved. 4 | // 5 | 6 | #import "SWBApplication.h" 7 | 8 | 9 | @implementation SWBApplication { 10 | 11 | } 12 | 13 | // Enable Key Shortcuts 14 | // http://stackoverflow.com/questions/970707/cocoa-keyboard-shortcuts-in-dialog-without-an-edit-menu 15 | - (void) sendEvent:(NSEvent *)event { 16 | if ([event type] == NSKeyDown) { 17 | if (([event modifierFlags] & NSDeviceIndependentModifierFlagsMask) == NSCommandKeyMask) { 18 | if ([[event charactersIgnoringModifiers] isEqualToString:@"x"]) { 19 | if ([self sendAction:@selector(cut:) to:nil from:self]) 20 | return; 21 | } 22 | else if ([[event charactersIgnoringModifiers] isEqualToString:@"c"]) { 23 | if ([self sendAction:@selector(copy:) to:nil from:self]) 24 | return; 25 | } 26 | else if ([[event charactersIgnoringModifiers] isEqualToString:@"v"]) { 27 | if ([self sendAction:@selector(paste:) to:nil from:self]) 28 | return; 29 | } 30 | else if ([[event charactersIgnoringModifiers] isEqualToString:@"z"]) { 31 | if ([self sendAction:@selector(undo) to:nil from:self]) 32 | return; 33 | } 34 | else if ([[event charactersIgnoringModifiers] isEqualToString:@"a"]) { 35 | if ([self sendAction:@selector(selectAll:) to:nil from:self]) 36 | return; 37 | } 38 | } 39 | else if (([event modifierFlags] & NSDeviceIndependentModifierFlagsMask) == (NSCommandKeyMask | NSShiftKeyMask)) { 40 | if ([[event charactersIgnoringModifiers] isEqualToString:@"Z"]) { 41 | if ([self sendAction:@selector(redo) to:nil from:self]) 42 | return; 43 | } 44 | } 45 | } 46 | [super sendEvent:event]; 47 | } 48 | 49 | @end -------------------------------------------------------------------------------- /ShadowsocksX-NG/ProxyConfTool.m: -------------------------------------------------------------------------------- 1 | // 2 | // ProxyConfTool.m 3 | // ShadowsocksX-NG 4 | // 5 | // Created by 邱宇舟 on 16/6/29. 6 | // Copyright © 2016年 qiuyuzhou. All rights reserved. 7 | // 8 | 9 | #import "ProxyConfTool.h" 10 | #import 11 | 12 | //https://developer.apple.com/library/mac/documentation/Networking/Conceptual/SystemConfigFrameworks/SC_Intro/SC_Intro.html 13 | 14 | @implementation ProxyConfTool 15 | 16 | 17 | +(NSArray*)networkServicesList { 18 | NSMutableArray* results = [NSMutableArray array]; 19 | 20 | SCPreferencesRef prefRef = SCPreferencesCreate(nil, CFSTR("Shadowsocks"), nil); 21 | NSDictionary *sets = (__bridge NSDictionary *)SCPreferencesGetValue(prefRef, kSCPrefNetworkServices); 22 | // 遍历系统中的网络设备列表 23 | for (NSString *key in [sets allKeys]) { 24 | NSMutableDictionary *service = [sets objectForKey:key]; 25 | NSString *userDefinedName = [service valueForKey:(__bridge NSString *)kSCPropUserDefinedName]; 26 | // NSString *hardware = [service valueForKeyPath:@"Interface.Hardware"]; 27 | // NSString *deviceName = [service valueForKeyPath:@"Interface.DeviceName"]; 28 | // NSString *deviceType = [service valueForKeyPath:@"Interface.Type"]; 29 | 30 | BOOL isActive = ![service objectForKey:(NSString *)kSCResvInactive]; 31 | // NSLog(@"%@", hardware); 32 | // NSLog(@"%@-------------------", key); 33 | // for(NSString* key in service) { 34 | // NSLog(@"key=%@ value=%@", key, [service objectForKey:key]); 35 | // } 36 | // 37 | if (isActive) { 38 | if (isActive && userDefinedName) { 39 | NSDictionary* v = @{ 40 | @"key": key, 41 | @"userDefinedName": userDefinedName, 42 | }; 43 | [results addObject:v]; 44 | } 45 | } 46 | } 47 | 48 | return results; 49 | } 50 | 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /Pods/MASShortcut/ko.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* Cancel action button in recording state */ 2 | "Cancel" = "취소"; 3 | 4 | /* Tooltip for non-empty shortcut button */ 5 | "Click to record new shortcut" = "클릭해 단축 키를 입력"; 6 | 7 | /* Tooltip for hint button near the non-empty shortcut */ 8 | "Delete shortcut" = "단축키 삭제"; 9 | 10 | /* VoiceOver title */ 11 | "keyboard shortcut" = "키보드 단축키"; 12 | 13 | /* Alert button when shortcut is already used */ 14 | "OK" = "좋아"; 15 | 16 | /* Empty shortcut button in normal state */ 17 | "Record Shortcut" = "단축키 입력"; 18 | 19 | /* VoiceOver: Shortcut cleared */ 20 | "Shortcut cleared" = "단축키 삭제됨"; 21 | 22 | /* VoiceOver: Shortcut set */ 23 | "Shortcut set" = "단축키 설정됨"; 24 | 25 | /* Shortcut glyph name for SPACE key */ 26 | "Space" = "스페이스 바"; 27 | 28 | /* Title for alert when shortcut is already used */ 29 | "The key combination %@ cannot be used" = "%@ 단축키로 설정할 수 없습니다"; 30 | 31 | /* Message for alert when shortcut is already used by the system */ 32 | "This combination cannot be used because it is already used by a system-wide keyboard shortcut.\nIf you really want to use this key combination, most shortcuts can be changed in the Keyboard & Mouse panel in System Preferences." = "이 결합은 시스템 전체에서 사용 때문에 단축키로 설정 할 수 없습니다.\n단축키를 사용하고 싶으면 시스템 환경 설정의 키보드, 마우스 패널에서 이미 설정되어있는 단축키를 변경하십시오."; 33 | 34 | /* Message for alert when shortcut is already used */ 35 | "This shortcut cannot be used because it is already used by the menu item ‘%@’." = "이 단축키는 ‘%@’ 메뉴 아이템에 사용되고 있기 때문에 설정할 수 없습니다."; 36 | 37 | /* VoiceOver shortcut help */ 38 | "To record a new shortcut, click this button, and then type the new shortcut, or press delete to clear an existing shortcut." = "이 버튼을 클릭하고 단축키를 입력하면 새로운 단축키가 설정됩니다. 또한 삭제 버튼을 누르면 단축키가 삭제됩니다."; 39 | 40 | /* Non-empty shortcut button in recording state */ 41 | "Type New Shortcut" = "새 단축키 입력"; 42 | 43 | /* Empty shortcut button in recording state */ 44 | "Type Shortcut" = "단축키 입력"; 45 | 46 | /* Cancel action button for non-empty shortcut in recording state */ 47 | "Use Old Shortcut" = "오래된 단축키를 사용"; 48 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Observables/Sink.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Sink.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 2/19/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | class Sink : Disposable { 10 | fileprivate let _observer: O 11 | fileprivate let _cancel: Cancelable 12 | fileprivate var _disposed: Bool 13 | 14 | #if DEBUG 15 | fileprivate let _synchronizationTracker = SynchronizationTracker() 16 | #endif 17 | 18 | init(observer: O, cancel: Cancelable) { 19 | #if TRACE_RESOURCES 20 | let _ = Resources.incrementTotal() 21 | #endif 22 | _observer = observer 23 | _cancel = cancel 24 | _disposed = false 25 | } 26 | 27 | final func forwardOn(_ event: Event) { 28 | #if DEBUG 29 | _synchronizationTracker.register(synchronizationErrorMessage: .default) 30 | defer { _synchronizationTracker.unregister() } 31 | #endif 32 | if _disposed { 33 | return 34 | } 35 | _observer.on(event) 36 | } 37 | 38 | final func forwarder() -> SinkForward { 39 | return SinkForward(forward: self) 40 | } 41 | 42 | final var disposed: Bool { 43 | return _disposed 44 | } 45 | 46 | func dispose() { 47 | _disposed = true 48 | _cancel.dispose() 49 | } 50 | 51 | deinit { 52 | #if TRACE_RESOURCES 53 | let _ = Resources.decrementTotal() 54 | #endif 55 | } 56 | } 57 | 58 | final class SinkForward: ObserverType { 59 | typealias E = O.E 60 | 61 | private let _forward: Sink 62 | 63 | init(forward: Sink) { 64 | _forward = forward 65 | } 66 | 67 | final func on(_ event: Event) { 68 | switch event { 69 | case .next: 70 | _forward._observer.on(event) 71 | case .error, .completed: 72 | _forward._observer.on(event) 73 | _forward._cancel.dispose() 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OperationQueueScheduler.swift 3 | // RxSwift 4 | // 5 | // Created by Krunoslav Zaher on 4/4/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | import class Foundation.OperationQueue 10 | import class Foundation.BlockOperation 11 | import Dispatch 12 | 13 | /// Abstracts the work that needs to be performed on a specific `NSOperationQueue`. 14 | /// 15 | /// This scheduler is suitable for cases when there is some bigger chunk of work that needs to be performed in background and you want to fine tune concurrent processing using `maxConcurrentOperationCount`. 16 | public class OperationQueueScheduler: ImmediateSchedulerType { 17 | public let operationQueue: OperationQueue 18 | 19 | /// Constructs new instance of `OperationQueueScheduler` that performs work on `operationQueue`. 20 | /// 21 | /// - parameter operationQueue: Operation queue targeted to perform work on. 22 | public init(operationQueue: OperationQueue) { 23 | self.operationQueue = operationQueue 24 | } 25 | 26 | /** 27 | Schedules an action to be executed recursively. 28 | 29 | - parameter state: State passed to the action to be executed. 30 | - parameter action: Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in recursive invocation state. 31 | - returns: The disposable object used to cancel the scheduled action (best effort). 32 | */ 33 | public func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { 34 | let cancel = SingleAssignmentDisposable() 35 | 36 | let operation = BlockOperation { 37 | if cancel.isDisposed { 38 | return 39 | } 40 | 41 | 42 | cancel.setDisposable(action(state)) 43 | } 44 | 45 | self.operationQueue.addOperation(operation) 46 | 47 | return cancel 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable+CoreGraphics.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KVORepresentable+CoreGraphics.swift 3 | // RxCocoa 4 | // 5 | // Created by Krunoslav Zaher on 11/14/15. 6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | #if !os(Linux) 10 | 11 | #if !RX_NO_MODULE 12 | import RxSwift 13 | #endif 14 | import CoreGraphics 15 | 16 | import class Foundation.NSValue 17 | 18 | #if arch(x86_64) || arch(arm64) 19 | let CGRectType = "{CGRect={CGPoint=dd}{CGSize=dd}}" 20 | let CGSizeType = "{CGSize=dd}" 21 | let CGPointType = "{CGPoint=dd}" 22 | #elseif arch(i386) || arch(arm) 23 | let CGRectType = "{CGRect={CGPoint=ff}{CGSize=ff}}" 24 | let CGSizeType = "{CGSize=ff}" 25 | let CGPointType = "{CGPoint=ff}" 26 | #endif 27 | 28 | extension CGRect : KVORepresentable { 29 | public typealias KVOType = NSValue 30 | 31 | /// Constructs self from `NSValue`. 32 | public init?(KVOValue: KVOType) { 33 | if strcmp(KVOValue.objCType, CGRectType) != 0 { 34 | return nil 35 | } 36 | var typedValue = CGRect(x: 0, y: 0, width: 0, height: 0) 37 | KVOValue.getValue(&typedValue) 38 | self = typedValue 39 | } 40 | } 41 | 42 | extension CGPoint : KVORepresentable { 43 | public typealias KVOType = NSValue 44 | 45 | /// Constructs self from `NSValue`. 46 | public init?(KVOValue: KVOType) { 47 | if strcmp(KVOValue.objCType, CGPointType) != 0 { 48 | return nil 49 | } 50 | var typedValue = CGPoint(x: 0, y: 0) 51 | KVOValue.getValue(&typedValue) 52 | self = typedValue 53 | } 54 | } 55 | 56 | extension CGSize : KVORepresentable { 57 | public typealias KVOType = NSValue 58 | 59 | /// Constructs self from `NSValue`. 60 | public init?(KVOValue: KVOType) { 61 | if strcmp(KVOValue.objCType, CGSizeType) != 0 { 62 | return nil 63 | } 64 | var typedValue = CGSize(width: 0, height: 0) 65 | KVOValue.getValue(&typedValue) 66 | self = typedValue 67 | } 68 | } 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /Pods/RxSwift/RxSwift/Reactive.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Reactive.swift 3 | // RxSwift 4 | // 5 | // Created by Yury Korolev on 5/2/16. 6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | /** 10 | Use `Reactive` proxy as customization point for constrained protocol extensions. 11 | 12 | General pattern would be: 13 | 14 | // 1. Extend Reactive protocol with constrain on Base 15 | // Read as: Reactive Extension where Base is a SomeType 16 | extension Reactive where Base: SomeType { 17 | // 2. Put any specific reactive extension for SomeType here 18 | } 19 | 20 | With this approach we can have more specialized methods and properties using 21 | `Base` and not just specialized on common base type. 22 | 23 | */ 24 | 25 | public struct Reactive { 26 | /// Base object to extend. 27 | public let base: Base 28 | 29 | /// Creates extensions with base object. 30 | /// 31 | /// - parameter base: Base object. 32 | public init(_ base: Base) { 33 | self.base = base 34 | } 35 | } 36 | 37 | /// A type that has reactive extensions. 38 | public protocol ReactiveCompatible { 39 | /// Extended type 40 | associatedtype CompatibleType 41 | 42 | /// Reactive extensions. 43 | static var rx: Reactive.Type { get set } 44 | 45 | /// Reactive extensions. 46 | var rx: Reactive { get set } 47 | } 48 | 49 | extension ReactiveCompatible { 50 | /// Reactive extensions. 51 | public static var rx: Reactive.Type { 52 | get { 53 | return Reactive.self 54 | } 55 | set { 56 | // this enables using Reactive to "mutate" base type 57 | } 58 | } 59 | 60 | /// Reactive extensions. 61 | public var rx: Reactive { 62 | get { 63 | return Reactive(self) 64 | } 65 | set { 66 | // this enables using Reactive to "mutate" base object 67 | } 68 | } 69 | } 70 | 71 | import class Foundation.NSObject 72 | 73 | /// Extend NSObject with `rx` proxy. 74 | extension NSObject: ReactiveCompatible { } 75 | -------------------------------------------------------------------------------- /Pods/MASShortcut/ja.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* Cancel action button in recording state */ 2 | "Cancel" = "キャンセルする"; 3 | 4 | /* Tooltip for non-empty shortcut button */ 5 | "Click to record new shortcut" = "クリックしてショートカットを入力"; 6 | 7 | /* Tooltip for hint button near the non-empty shortcut */ 8 | "Delete shortcut" = "ショートカットを削除"; 9 | 10 | /* VoiceOver title */ 11 | "keyboard shortcut" = "キーボードショートカット"; 12 | 13 | /* Alert button when shortcut is already used */ 14 | "OK" = "OK"; 15 | 16 | /* Empty shortcut button in normal state */ 17 | "Record Shortcut" = "ショートカットを入力"; 18 | 19 | /* VoiceOver: Shortcut cleared */ 20 | "Shortcut cleared" = "ショートカットが削除されました"; 21 | 22 | /* VoiceOver: Shortcut set */ 23 | "Shortcut set" = "ショートカットが設定されました"; 24 | 25 | /* Shortcut glyph name for SPACE key */ 26 | "Space" = "スペース"; 27 | 28 | /* Title for alert when shortcut is already used */ 29 | "The key combination %@ cannot be used" = "%@ はショートカットに設定できません"; 30 | 31 | /* Message for alert when shortcut is already used by the system */ 32 | "This combination cannot be used because it is already used by a system-wide keyboard shortcut.\nIf you really want to use this key combination, most shortcuts can be changed in the Keyboard & Mouse panel in System Preferences." = "このショートカットは、システム全体で使用されているショートカットのため、設定することができません。\nもしこのショートカットを使用したい場合、「システム環境設定」の「キーボード」、「マウス」のパネルから既に設定されているショートカットを変更してください。"; 33 | 34 | /* Message for alert when shortcut is already used */ 35 | "This shortcut cannot be used because it is already used by the menu item ‘%@’." = "このショートカットは、メニュー操作の「%@」で使われているため、設定できません。"; 36 | 37 | /* VoiceOver shortcut help */ 38 | "To record a new shortcut, click this button, and then type the new shortcut, or press delete to clear an existing shortcut." = "このボタンをクリックし、ショートカットを入力すると、新しいショートカットが設定されます。また、削除ボタンをおすと、ショートカットが削除されます。"; 39 | 40 | /* Non-empty shortcut button in recording state */ 41 | "Type New Shortcut" = "ショートカットを入力"; 42 | 43 | /* Empty shortcut button in recording state */ 44 | "Type Shortcut" = "ショートカットを入力"; 45 | 46 | /* Cancel action button for non-empty shortcut in recording state */ 47 | "Use Old Shortcut" = "古いショートカットを使用"; 48 | --------------------------------------------------------------------------------