diff --git a/CHANGELOG.md b/CHANGELOG.md index 754e94fe6e342807fad8a2c115a63f3bc8542460..6afc27ab495b0f1997abd91d66219672a1a521e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # IPtProxy Changelog +## 1.8.1 +- Added `Obfs4proxyLogFile` which returns the static log file name of Obfs4proxy. + ## 1.8.0 - Updated Obfs4proxy to latest version 0.0.14. - Updated Snowflake to latest version 2.3.1. diff --git a/IPtProxy-sources.jar b/IPtProxy-sources.jar index 7b86497135e18d4b69280959ba858a5f4d6c6b19..4965f85137a12f5db578e346fdd0e6a49a78c8bb 100644 Binary files a/IPtProxy-sources.jar and b/IPtProxy-sources.jar differ diff --git a/IPtProxy.aar b/IPtProxy.aar index 3f1561c5670b7d6a925c616b2debdc7be6e75647..499e140280cbee4fd54c151beefacb6f9688a678 100644 Binary files a/IPtProxy.aar and b/IPtProxy.aar differ diff --git a/IPtProxy.podspec b/IPtProxy.podspec index e5814b134a84e841650c056b9f52a2cb04c4dfe5..fca84d2bfd71aa4a3df7c5c05d647deb5d6bc39a 100644 --- a/IPtProxy.podspec +++ b/IPtProxy.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'IPtProxy' - s.version = '1.8.0' + s.version = '1.8.1' s.summary = 'Obfs4proxy and Snowflake Pluggable Transports for iOS and macOS' s.description = <<-DESC 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 09324fabf4e99595e8897ffff628e5618629eaa7..6868b197003cdba2bf15825a849ea03264ad62de 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 @@ -71,6 +71,13 @@ FOUNDATION_EXPORT long IPtProxyObfs4Port(void); */ FOUNDATION_EXPORT NSString* _Nonnull IPtProxyObfs4ProxyVersion(void); +/** + * Obfs4proxyLogFile - The log file name used by Obfs4proxy. + +The Obfs4proxy log file can be found at `filepath.Join(StateLocation, Obfs4proxyLogFile())`. + */ +FOUNDATION_EXPORT NSString* _Nonnull IPtProxyObfs4proxyLogFile(void); + /** * ScramblesuitPort - Port where Obfs4proxy will provide its Scramblesuit service. Only use this property after calling StartObfs4Proxy! It might have changed after that! @@ -84,7 +91,7 @@ Only use this property after calling StartSnowflake! It might have changed after FOUNDATION_EXPORT long IPtProxySnowflakePort(void); /** - * SnowflakeVersion - The version of Snowflake bundled with IPtProxy. + * SnowflakeVersion - The version of Snowflake bundled with IPtProxy. */ FOUNDATION_EXPORT NSString* _Nonnull IPtProxySnowflakeVersion(void); @@ -103,6 +110,7 @@ Only use the port properties after calling this, they might have been changed! @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! */ FOUNDATION_EXPORT long IPtProxyStartObfs4Proxy(NSString* _Nullable logLevel, BOOL enableLogging, BOOL unsafeLogging, NSString* _Nullable proxy); @@ -117,7 +125,8 @@ FOUNDATION_EXPORT long IPtProxyStartObfs4Proxy(NSString* _Nullable logLevel, BOO @param front Front domain. @param ampCache OPTIONAL. URL of AMP cache to use as a proxy for signaling. - Only needed when you want to do the rendezvous over AMP instead of a domain fronted server. + + Only needed when you want to do the rendezvous over AMP instead of a domain fronted server. @param logFile Name of log file. OPTIONAL. Defaults to no log. @@ -153,8 +162,9 @@ FOUNDATION_EXPORT long IPtProxyStartSnowflake(NSString* _Nullable ice, NSString* @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 + + 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 natProbe, NSString* _Nullable logFile, BOOL keepLocalAddresses, BOOL unsafeLogging, id<IPtProxySnowflakeClientConnected> _Nullable clientConnected); diff --git a/IPtProxy.xcframework/ios-arm64/IPtProxy.framework/Versions/A/IPtProxy b/IPtProxy.xcframework/ios-arm64/IPtProxy.framework/Versions/A/IPtProxy index f5e7ff53c1c2fc9767557361e02fe71360444c00..ab6d1f3c4bd58c97be09d5c1da3be007ed41a008 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 09324fabf4e99595e8897ffff628e5618629eaa7..6868b197003cdba2bf15825a849ea03264ad62de 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 @@ -71,6 +71,13 @@ FOUNDATION_EXPORT long IPtProxyObfs4Port(void); */ FOUNDATION_EXPORT NSString* _Nonnull IPtProxyObfs4ProxyVersion(void); +/** + * Obfs4proxyLogFile - The log file name used by Obfs4proxy. + +The Obfs4proxy log file can be found at `filepath.Join(StateLocation, Obfs4proxyLogFile())`. + */ +FOUNDATION_EXPORT NSString* _Nonnull IPtProxyObfs4proxyLogFile(void); + /** * ScramblesuitPort - Port where Obfs4proxy will provide its Scramblesuit service. Only use this property after calling StartObfs4Proxy! It might have changed after that! @@ -84,7 +91,7 @@ Only use this property after calling StartSnowflake! It might have changed after FOUNDATION_EXPORT long IPtProxySnowflakePort(void); /** - * SnowflakeVersion - The version of Snowflake bundled with IPtProxy. + * SnowflakeVersion - The version of Snowflake bundled with IPtProxy. */ FOUNDATION_EXPORT NSString* _Nonnull IPtProxySnowflakeVersion(void); @@ -103,6 +110,7 @@ Only use the port properties after calling this, they might have been changed! @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! */ FOUNDATION_EXPORT long IPtProxyStartObfs4Proxy(NSString* _Nullable logLevel, BOOL enableLogging, BOOL unsafeLogging, NSString* _Nullable proxy); @@ -117,7 +125,8 @@ FOUNDATION_EXPORT long IPtProxyStartObfs4Proxy(NSString* _Nullable logLevel, BOO @param front Front domain. @param ampCache OPTIONAL. URL of AMP cache to use as a proxy for signaling. - Only needed when you want to do the rendezvous over AMP instead of a domain fronted server. + + Only needed when you want to do the rendezvous over AMP instead of a domain fronted server. @param logFile Name of log file. OPTIONAL. Defaults to no log. @@ -153,8 +162,9 @@ FOUNDATION_EXPORT long IPtProxyStartSnowflake(NSString* _Nullable ice, NSString* @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 + + 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 natProbe, NSString* _Nullable logFile, BOOL keepLocalAddresses, BOOL unsafeLogging, id<IPtProxySnowflakeClientConnected> _Nullable clientConnected); 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 e35915dc3dbd9fdeb544cdf5c8b2e805225856e6..d375bfaa43f28be1273e217f7582ac1e6b69002a 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/IPtProxy.xcframework/macos-arm64_x86_64/IPtProxy.framework/Versions/A/Headers/IPtProxy.objc.h b/IPtProxy.xcframework/macos-arm64_x86_64/IPtProxy.framework/Versions/A/Headers/IPtProxy.objc.h index 09324fabf4e99595e8897ffff628e5618629eaa7..6868b197003cdba2bf15825a849ea03264ad62de 100644 --- a/IPtProxy.xcframework/macos-arm64_x86_64/IPtProxy.framework/Versions/A/Headers/IPtProxy.objc.h +++ b/IPtProxy.xcframework/macos-arm64_x86_64/IPtProxy.framework/Versions/A/Headers/IPtProxy.objc.h @@ -71,6 +71,13 @@ FOUNDATION_EXPORT long IPtProxyObfs4Port(void); */ FOUNDATION_EXPORT NSString* _Nonnull IPtProxyObfs4ProxyVersion(void); +/** + * Obfs4proxyLogFile - The log file name used by Obfs4proxy. + +The Obfs4proxy log file can be found at `filepath.Join(StateLocation, Obfs4proxyLogFile())`. + */ +FOUNDATION_EXPORT NSString* _Nonnull IPtProxyObfs4proxyLogFile(void); + /** * ScramblesuitPort - Port where Obfs4proxy will provide its Scramblesuit service. Only use this property after calling StartObfs4Proxy! It might have changed after that! @@ -84,7 +91,7 @@ Only use this property after calling StartSnowflake! It might have changed after FOUNDATION_EXPORT long IPtProxySnowflakePort(void); /** - * SnowflakeVersion - The version of Snowflake bundled with IPtProxy. + * SnowflakeVersion - The version of Snowflake bundled with IPtProxy. */ FOUNDATION_EXPORT NSString* _Nonnull IPtProxySnowflakeVersion(void); @@ -103,6 +110,7 @@ Only use the port properties after calling this, they might have been changed! @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! */ FOUNDATION_EXPORT long IPtProxyStartObfs4Proxy(NSString* _Nullable logLevel, BOOL enableLogging, BOOL unsafeLogging, NSString* _Nullable proxy); @@ -117,7 +125,8 @@ FOUNDATION_EXPORT long IPtProxyStartObfs4Proxy(NSString* _Nullable logLevel, BOO @param front Front domain. @param ampCache OPTIONAL. URL of AMP cache to use as a proxy for signaling. - Only needed when you want to do the rendezvous over AMP instead of a domain fronted server. + + Only needed when you want to do the rendezvous over AMP instead of a domain fronted server. @param logFile Name of log file. OPTIONAL. Defaults to no log. @@ -153,8 +162,9 @@ FOUNDATION_EXPORT long IPtProxyStartSnowflake(NSString* _Nullable ice, NSString* @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 + + 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 natProbe, NSString* _Nullable logFile, BOOL keepLocalAddresses, BOOL unsafeLogging, id<IPtProxySnowflakeClientConnected> _Nullable clientConnected); diff --git a/IPtProxy.xcframework/macos-arm64_x86_64/IPtProxy.framework/Versions/A/IPtProxy b/IPtProxy.xcframework/macos-arm64_x86_64/IPtProxy.framework/Versions/A/IPtProxy index c037af03dbfa08dd89d8832947d252a92099d3bf..f03392e83307dfd92c7228ce57d2739d1c4d2132 100644 Binary files a/IPtProxy.xcframework/macos-arm64_x86_64/IPtProxy.framework/Versions/A/IPtProxy and b/IPtProxy.xcframework/macos-arm64_x86_64/IPtProxy.framework/Versions/A/IPtProxy differ diff --git a/README.md b/README.md index e6cc860f37ade8601f48e6052c676c8a7e52fe98..1e67c2e557169c43930970cae348a04795b25a03 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,18 @@ pod 'IPtProxy', '~> 1.8' ### Getting Started +Before using IPtProxy it is recommended to specify a place on disk for the transports +to store their state information and log files. + +By default, a temporary directory is created, but often times, that is not sufficient. + +```swift +let ptDir = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "group.com.example.app")? + .appendingPathComponent("pt_state") + +IPtProxy.setStateLocation(ptDir?.path) +``` + There's a companion library [IPtProxyUI](https://github.com/tladesignz/IPtProxyUI) which explains the use of IPtProxy and provides all the necessary UI and additional information to use this library completely in a Tor context. diff --git a/jitpack.yml b/jitpack.yml index ec2ca9a74d5bca811fedbbf893565e23390ef47b..884a19830b90b4cd71a313fa2498532043dd4229 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.8.0 -Dpackaging=aar -DgeneratePom=true -Dsources=IPtProxy-sources.jar + - mvn install:install-file $FILE -DgroupId=com.github.tladesignz -DartifactId=IPtProxy -Dversion=1.8.1 -Dpackaging=aar -DgeneratePom=true -Dsources=IPtProxy-sources.jar diff --git a/pom.xml b/pom.xml index 05f2b07b7848d799b60c9af4188d4ee674e56df8..c43448aef83ae58f7d9635d9d58dad89c19bbe29 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.8.0</version> + <version>1.8.1</version> </project>