I have generated LibXray.xcframework for your iOS app. Added it. Next, I tried to test my V2Ray config and I got this error: invalid character 'i' in literal false (expecting 'a')
Run: iOS 18.1, Real device
import LibXray
// Getting the configuration from the storage
guard let v2RayConfig: String = storageManager.get(key: .v2rayConfig) else { return }
// Creating a file for the config locally
let tempDirectory = FileManager.default.temporaryDirectory
let configURL = tempDirectory.appendingPathComponent("xray_config.json")
try v2RayConfig.write(to: configURL, atomically: true, encoding: .utf8)
// Converting the path for the config to base64
// absoluteString: file:///private/var/mobile/Containers/Data/Application/F6535AB0-A3E9-4439-A0B7-96F5977BC151/tmp/xray_config.json
// absoluteStringBase64String: ZmlsZTovLy9wcml2YXRlL3Zhci9tb2JpbGUvQ29udGFpbmVycy9EYXRhL0FwcGxpY2F0aW9uL0Y2NTM1QUIwLUEzRTktNDQzOS1BMEI3LTk2RjU5NzdCQzE1MS90bXAveHJheV9jb25maWcuanNvbg==
guard let pathBase64String = configURL.absoluteString.toBase64String() else { return }
let testBase64String = LibXrayTestXray(pathBase64String)
if let testResult = encodeResult(base64String: testBase64String) {
if let error = testResult.error {
print("testResult - error:", error)
}
}
The error is not related to the contents of the config. Because even an error pops up on an empty config.
- Do I understand correctly that function LibXrayTestXray is waiting for the input path to the v2ray config in base64 format?
I have generated
LibXray.xcframeworkfor your iOS app. Added it. Next, I tried to test my V2Ray config and I got this error:invalid character 'i' in literal false (expecting 'a')Run: iOS 18.1, Real device
The error is not related to the contents of the config. Because even an error pops up on an empty config.