diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a06502587c5eefb5522989635836bd33e4e1e15..571c3f5245b6e67043d429481ef8d53432e6cacb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # IPtProxy Changelog +## 1.3.0 +- Updated Snowflake to version 2.0.1. +- Added Snowflake AMP support. +- Switched to newer DTLS library, which improves fingerprinting resistance for Snowflake. +- Added callback to `StartSnowflakeProxy`, to allow counting of connected clients. +- Fixed iOS warnings about wrong iOS SDK. + ## 1.2.0 - Added explicit support for a proxy behind Obfs4proxy. diff --git a/IPtProxy-sources.jar b/IPtProxy-sources.jar index 97ca9063452c4a994866e17a7218e51bfdd0b38b..e43cd9850bd5439c4193a9eeaf6730ef04ffa205 100644 Binary files a/IPtProxy-sources.jar and b/IPtProxy-sources.jar differ diff --git a/IPtProxy.aar b/IPtProxy.aar index 51def102065fea18e2f5b900e1678ecbd27621e4..16d075a0f3694b519f8e6c7ad1cca6d20096b00c 100644 Binary files a/IPtProxy.aar and b/IPtProxy.aar differ diff --git a/IPtProxy.podspec b/IPtProxy.podspec index 7ff7ec5381813fea674970bbc81faf82439700dd..024b070bf72a8dcf75ad604b7f112bc9daa656ef 100644 --- a/IPtProxy.podspec +++ b/IPtProxy.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'IPtProxy' - s.version = '1.2.0' + s.version = '1.3.0' s.summary = 'Obfs4proxy and Snowflake Pluggable Transports for iOS' s.description = <<-DESC diff --git a/IPtProxy.xcframework/Info.plist b/IPtProxy.xcframework/Info.plist index f559237aeef2bdc7a474047e0ad5306f91ae084e..45f8f8c593f06f907d6785906b8b03faeebe7224 100644 --- a/IPtProxy.xcframework/Info.plist +++ b/IPtProxy.xcframework/Info.plist @@ -6,30 +6,30 @@ <array> <dict> <key>LibraryIdentifier</key> - <string>ios-arm64</string> + <string>ios-arm64_x86_64-simulator</string> <key>LibraryPath</key> <string>IPtProxy.framework</string> <key>SupportedArchitectures</key> <array> <string>arm64</string> + <string>x86_64</string> </array> <key>SupportedPlatform</key> <string>ios</string> + <key>SupportedPlatformVariant</key> + <string>simulator</string> </dict> <dict> <key>LibraryIdentifier</key> - <string>ios-arm64_x86_64-simulator</string> + <string>ios-arm64</string> <key>LibraryPath</key> <string>IPtProxy.framework</string> <key>SupportedArchitectures</key> <array> <string>arm64</string> - <string>x86_64</string> </array> <key>SupportedPlatform</key> <string>ios</string> - <key>SupportedPlatformVariant</key> - <string>simulator</string> </dict> </array> <key>CFBundlePackageType</key> diff --git a/IPtProxy.xcframework/ios-arm64/IPtProxy.framework/Versions/A/Headers/IPtProxy.objc.h b/IPtProxy.xcframework/ios-arm64/IPtProxy.framework/Versions/A/Headers/IPtProxy.objc.h index 7ad0b64261315222c41d739536903afb049bc9a5..3b828ba6cd18a9074d0ab65d29ce40118144eb90 100644 --- a/IPtProxy.xcframework/ios-arm64/IPtProxy.framework/Versions/A/Headers/IPtProxy.objc.h +++ b/IPtProxy.xcframework/ios-arm64/IPtProxy.framework/Versions/A/Headers/IPtProxy.objc.h @@ -11,6 +11,13 @@ #include "Universe.objc.h" +@protocol IPtProxySnowflakeClientConnected; +@class IPtProxySnowflakeClientConnected; + +@protocol IPtProxySnowflakeClientConnected <NSObject> +- (void)connected; +@end + @interface IPtProxy : NSObject /** * StateLocation - Override TOR_PT_STATE_LOCATION, which defaults to "$TMPDIR/pt_state". @@ -68,7 +75,7 @@ Only use the port properties after calling this, they might have been changed! @param unsafeLogging Disable the address scrubber. -@param proxy Proxy to be used by Obfs4proxy. E.g. "socks5://127.0.0.1:12345" +@param proxy HTTP, SOCKS4 or SOCKS5 proxy to be used behind Obfs4proxy. E.g. "socks5://127.0.0.1:12345" @return Port number where Obfs4Proxy will listen on for Obfs4(!), if no error happens during start up. If you need the other ports, check MeekPort, Obfs2Port, Obfs3Port and ScramblesuitPort properties! @@ -84,6 +91,8 @@ FOUNDATION_EXPORT long IPtProxyStartObfs4Proxy(NSString* _Nullable logLevel, BOO @param front Front domain. +@param ampCache URL of AMP cache to use as a proxy for signaling + @param logFile Name of log file. OPTIONAL @param logToStateDir Resolve the log file relative to Tor's PT state dir. @@ -96,26 +105,32 @@ FOUNDATION_EXPORT long IPtProxyStartObfs4Proxy(NSString* _Nullable logLevel, BOO @return Port number where Snowflake will listen on, if no error happens during start up. */ -FOUNDATION_EXPORT long IPtProxyStartSnowflake(NSString* _Nullable ice, NSString* _Nullable url, NSString* _Nullable front, NSString* _Nullable logFile, BOOL logToStateDir, BOOL keepLocalAddresses, BOOL unsafeLogging, long maxPeers); +FOUNDATION_EXPORT long IPtProxyStartSnowflake(NSString* _Nullable ice, NSString* _Nullable url, NSString* _Nullable front, NSString* _Nullable ampCache, NSString* _Nullable logFile, BOOL logToStateDir, BOOL keepLocalAddresses, BOOL unsafeLogging, long maxPeers); /** * StartSnowflakeProxy - Start the Snowflake proxy. @param capacity Maximum concurrent clients. OPTIONAL. Defaults to 10, if 0. -@param broker Broker URL. OPTIONAL. Defaults to https://snowflake-broker.bamsoftware.com/, if empty. +@param broker Broker URL. OPTIONAL. Defaults to https://snowflake-broker.torproject.net/, if empty. @param relay WebSocket relay URL. OPTIONAL. Defaults to wss://snowflake.bamsoftware.com/, if empty. @param stun STUN URL. OPTIONAL. Defaults to stun:stun.stunprotocol.org:3478, if empty. -@param logFile Name of log file. OPTIONAL +@param natProbe. OPTIONAL. Defaults to https://snowflake-broker.torproject.net:8443/probe, if empty. + +@param logFile Name of log file. OPTIONAL. Defaults to STDERR. @param keepLocalAddresses Keep local LAN address ICE candidates. @param unsafeLogging Prevent logs from being scrubbed. + +@param clientConnected A delegate which is called when a client successfully connected. + Will be called on its own thread! You will need to switch to your own UI thread, + if you want to do UI stuff!! OPTIONAL */ -FOUNDATION_EXPORT void IPtProxyStartSnowflakeProxy(long capacity, NSString* _Nullable broker, NSString* _Nullable relay, NSString* _Nullable stun, NSString* _Nullable logFile, BOOL keepLocalAddresses, BOOL unsafeLogging); +FOUNDATION_EXPORT void IPtProxyStartSnowflakeProxy(long capacity, NSString* _Nullable broker, NSString* _Nullable relay, NSString* _Nullable stun, NSString* _Nullable natProbe, NSString* _Nullable logFile, BOOL keepLocalAddresses, BOOL unsafeLogging, id<IPtProxySnowflakeClientConnected> _Nullable clientConnected); /** * StopObfs4Proxy - Stop the Obfs4Proxy. @@ -132,4 +147,21 @@ FOUNDATION_EXPORT void IPtProxyStopSnowflake(void); */ FOUNDATION_EXPORT void IPtProxyStopSnowflakeProxy(void); +@class IPtProxySnowflakeClientConnected; + +/** + * SnowflakeClientConnected - Interface to use when clients connect +to the snowflake proxy. For use with StartSnowflakeProxy + */ +@interface IPtProxySnowflakeClientConnected : NSObject <goSeqRefInterface, IPtProxySnowflakeClientConnected> { +} +@property(strong, readonly) _Nonnull id _ref; + +- (nonnull instancetype)initWithRef:(_Nonnull id)ref; +/** + * Connected - callback method to handle snowflake proxy client connections. + */ +- (void)connected; +@end + #endif diff --git a/IPtProxy.xcframework/ios-arm64/IPtProxy.framework/Versions/A/IPtProxy b/IPtProxy.xcframework/ios-arm64/IPtProxy.framework/Versions/A/IPtProxy index 9af7b75321439a6ee55f0e92f9eac360b435b46f..7ee1040371934b557be1b4e6cf012974ccf87a28 100644 Binary files a/IPtProxy.xcframework/ios-arm64/IPtProxy.framework/Versions/A/IPtProxy and b/IPtProxy.xcframework/ios-arm64/IPtProxy.framework/Versions/A/IPtProxy differ diff --git a/IPtProxy.xcframework/ios-arm64_x86_64-simulator/IPtProxy.framework/Versions/A/Headers/IPtProxy.objc.h b/IPtProxy.xcframework/ios-arm64_x86_64-simulator/IPtProxy.framework/Versions/A/Headers/IPtProxy.objc.h index 7ad0b64261315222c41d739536903afb049bc9a5..3b828ba6cd18a9074d0ab65d29ce40118144eb90 100644 --- a/IPtProxy.xcframework/ios-arm64_x86_64-simulator/IPtProxy.framework/Versions/A/Headers/IPtProxy.objc.h +++ b/IPtProxy.xcframework/ios-arm64_x86_64-simulator/IPtProxy.framework/Versions/A/Headers/IPtProxy.objc.h @@ -11,6 +11,13 @@ #include "Universe.objc.h" +@protocol IPtProxySnowflakeClientConnected; +@class IPtProxySnowflakeClientConnected; + +@protocol IPtProxySnowflakeClientConnected <NSObject> +- (void)connected; +@end + @interface IPtProxy : NSObject /** * StateLocation - Override TOR_PT_STATE_LOCATION, which defaults to "$TMPDIR/pt_state". @@ -68,7 +75,7 @@ Only use the port properties after calling this, they might have been changed! @param unsafeLogging Disable the address scrubber. -@param proxy Proxy to be used by Obfs4proxy. E.g. "socks5://127.0.0.1:12345" +@param proxy HTTP, SOCKS4 or SOCKS5 proxy to be used behind Obfs4proxy. E.g. "socks5://127.0.0.1:12345" @return Port number where Obfs4Proxy will listen on for Obfs4(!), if no error happens during start up. If you need the other ports, check MeekPort, Obfs2Port, Obfs3Port and ScramblesuitPort properties! @@ -84,6 +91,8 @@ FOUNDATION_EXPORT long IPtProxyStartObfs4Proxy(NSString* _Nullable logLevel, BOO @param front Front domain. +@param ampCache URL of AMP cache to use as a proxy for signaling + @param logFile Name of log file. OPTIONAL @param logToStateDir Resolve the log file relative to Tor's PT state dir. @@ -96,26 +105,32 @@ FOUNDATION_EXPORT long IPtProxyStartObfs4Proxy(NSString* _Nullable logLevel, BOO @return Port number where Snowflake will listen on, if no error happens during start up. */ -FOUNDATION_EXPORT long IPtProxyStartSnowflake(NSString* _Nullable ice, NSString* _Nullable url, NSString* _Nullable front, NSString* _Nullable logFile, BOOL logToStateDir, BOOL keepLocalAddresses, BOOL unsafeLogging, long maxPeers); +FOUNDATION_EXPORT long IPtProxyStartSnowflake(NSString* _Nullable ice, NSString* _Nullable url, NSString* _Nullable front, NSString* _Nullable ampCache, NSString* _Nullable logFile, BOOL logToStateDir, BOOL keepLocalAddresses, BOOL unsafeLogging, long maxPeers); /** * StartSnowflakeProxy - Start the Snowflake proxy. @param capacity Maximum concurrent clients. OPTIONAL. Defaults to 10, if 0. -@param broker Broker URL. OPTIONAL. Defaults to https://snowflake-broker.bamsoftware.com/, if empty. +@param broker Broker URL. OPTIONAL. Defaults to https://snowflake-broker.torproject.net/, if empty. @param relay WebSocket relay URL. OPTIONAL. Defaults to wss://snowflake.bamsoftware.com/, if empty. @param stun STUN URL. OPTIONAL. Defaults to stun:stun.stunprotocol.org:3478, if empty. -@param logFile Name of log file. OPTIONAL +@param natProbe. OPTIONAL. Defaults to https://snowflake-broker.torproject.net:8443/probe, if empty. + +@param logFile Name of log file. OPTIONAL. Defaults to STDERR. @param keepLocalAddresses Keep local LAN address ICE candidates. @param unsafeLogging Prevent logs from being scrubbed. + +@param clientConnected A delegate which is called when a client successfully connected. + Will be called on its own thread! You will need to switch to your own UI thread, + if you want to do UI stuff!! OPTIONAL */ -FOUNDATION_EXPORT void IPtProxyStartSnowflakeProxy(long capacity, NSString* _Nullable broker, NSString* _Nullable relay, NSString* _Nullable stun, NSString* _Nullable logFile, BOOL keepLocalAddresses, BOOL unsafeLogging); +FOUNDATION_EXPORT void IPtProxyStartSnowflakeProxy(long capacity, NSString* _Nullable broker, NSString* _Nullable relay, NSString* _Nullable stun, NSString* _Nullable natProbe, NSString* _Nullable logFile, BOOL keepLocalAddresses, BOOL unsafeLogging, id<IPtProxySnowflakeClientConnected> _Nullable clientConnected); /** * StopObfs4Proxy - Stop the Obfs4Proxy. @@ -132,4 +147,21 @@ FOUNDATION_EXPORT void IPtProxyStopSnowflake(void); */ FOUNDATION_EXPORT void IPtProxyStopSnowflakeProxy(void); +@class IPtProxySnowflakeClientConnected; + +/** + * SnowflakeClientConnected - Interface to use when clients connect +to the snowflake proxy. For use with StartSnowflakeProxy + */ +@interface IPtProxySnowflakeClientConnected : NSObject <goSeqRefInterface, IPtProxySnowflakeClientConnected> { +} +@property(strong, readonly) _Nonnull id _ref; + +- (nonnull instancetype)initWithRef:(_Nonnull id)ref; +/** + * Connected - callback method to handle snowflake proxy client connections. + */ +- (void)connected; +@end + #endif diff --git a/IPtProxy.xcframework/ios-arm64_x86_64-simulator/IPtProxy.framework/Versions/A/IPtProxy b/IPtProxy.xcframework/ios-arm64_x86_64-simulator/IPtProxy.framework/Versions/A/IPtProxy index 0c8ff6dc2d6d24f5e29498b665c4294e295c8f48..3fe446f6cd89df83e9f9a17bd984fd7ff4edc8a9 100644 Binary files a/IPtProxy.xcframework/ios-arm64_x86_64-simulator/IPtProxy.framework/Versions/A/IPtProxy and b/IPtProxy.xcframework/ios-arm64_x86_64-simulator/IPtProxy.framework/Versions/A/IPtProxy differ diff --git a/README.md b/README.md index 2f0247c8062bc7aa39a09fa065240064b12a6d72..3a06dc8fd84b237328d5d93e610d1e74cb1015b6 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ IPtProxy is available through [CocoaPods](https://cocoapods.org). To install it, simply add the following line to your `Podfile`: ```ruby -pod 'IPtProxy', '~> 1.2' +pod 'IPtProxy', '~> 1.3' ``` ### Getting Started @@ -59,7 +59,7 @@ IPtProxy is available through [JitPack](https://jitpack.io). To install it, simply add the following line to your `build.gradle` file: ```groovy -implementation 'com.github.tladesignz:IPtProxy:1.2.0' +implementation 'com.github.tladesignz:IPtProxy:1.3.0' ``` And this to your root `build.gradle` at the end of repositories: diff --git a/jitpack.yml b/jitpack.yml index 486e25457db6cde73afd30874aa37e1d333720b7..20cdf79ba24f011d815ff5c75fea6363a59ed3b2 100644 --- a/jitpack.yml +++ b/jitpack.yml @@ -1,3 +1,3 @@ install: - FILE="-Dfile=IPtProxy.aar" - - mvn install:install-file $FILE -DgroupId=com.github.tladesignz -DartifactId=IPtProxy -Dversion=1.2.0 -Dpackaging=aar -DgeneratePom=true -Dsources=IPtProxy-sources.jar + - mvn install:install-file $FILE -DgroupId=com.github.tladesignz -DartifactId=IPtProxy -Dversion=1.3.0 -Dpackaging=aar -DgeneratePom=true -Dsources=IPtProxy-sources.jar diff --git a/pom.xml b/pom.xml index 32ffb2e3cd8e372e9f0056f9f2c89a92083572b4..6823ad6f5d88e87b3c8be0c4603f97eba48ebee8 100644 --- a/pom.xml +++ b/pom.xml @@ -5,5 +5,5 @@ <modelVersion>4.0.0</modelVersion> <groupId>com.github.tladesignz</groupId> <artifactId>IPtProxy</artifactId> - <version>1.2.0</version> + <version>1.3.0</version> </project>