ADD: Patch to return false on Mainsetup for Tor

This commit is contained in:
Marcos Rodriguez Velez 2023-11-10 11:21:23 -04:00
parent 6d8ee072fb
commit 7dc7903947
No known key found for this signature in database
GPG Key ID: 6030B2F48CCE86D7
2 changed files with 14 additions and 1 deletions

View File

@ -53,7 +53,7 @@
"android:clean": "cd android; ./gradlew clean ; cd .. ; npm run android", "android:clean": "cd android; ./gradlew clean ; cd .. ; npm run android",
"ios": "react-native run-ios", "ios": "react-native run-ios",
"postinstall": "rn-nodeify --install buffer,events,process,stream,inherits,path,assert,crypto --hack; npm run releasenotes2json; npm run branch2json; npm run podinstall; npm run patches", "postinstall": "rn-nodeify --install buffer,events,process,stream,inherits,path,assert,crypto --hack; npm run releasenotes2json; npm run branch2json; npm run podinstall; npm run patches",
"patches": "patch -p1 < scripts/react-native-tor.patch; patch -p1 < scripts/rn-ldk.patch", "patches": "patch -p1 < scripts/react-native-tor.patch; patch -p1 < scripts/react-native-tor-ios.patch; patch -p1 < scripts/rn-ldk.patch",
"test": "npm run tslint && npm run lint && npm run unit && npm run jest", "test": "npm run tslint && npm run lint && npm run unit && npm run jest",
"jest": "jest -b tests/integration/*", "jest": "jest -b tests/integration/*",
"windowspatches": "./scripts/windows-patches.sh", "windowspatches": "./scripts/windows-patches.sh",

View File

@ -0,0 +1,13 @@
--- ../node_modules/react-native-tor/ios/Tor.swift 2023-11-10 11:17:20
+++ ../node_modules/react-native-tor/ios/Tor.swift 2023-11-10 11:17:16
@@ -42,6 +42,10 @@
var streams:Dictionary<String,OpaquePointer> = [:];
var hasLnser = false;
var clienTimeout:TimeInterval = 60;
+
+ override class func requiresMainQueueSetup() -> Bool {
+ return false
+ }
func getProxiedClient(headers:Optional<NSDictionary>,socksPort:UInt16,trustInvalidSSL: Bool = false)->URLSession{
let config = URLSessionConfiguration.default;