/FloxcoreXrayKit

XrayKit for Floxcore

Primary LanguageSwift

XrayKit

Release

Download

Usage

import XrayKit

/* Start XrayCore */
let configurationFile = FileManager.default.temporaryDirectory.appendingPathComponent("xray").appendingPathExtension("json")
// Write Xray configuration to configurationFile

let geoip = Bundle.main.url(forResource: "geoip", withExtension: "dat")!
let assets = geoip.deletingLastPathComponent()

XRayCore.run(configuration: configuratonFile, assets: assets) { error in
    if let error = error {
        // Present error
    }
}

/* Stop XrayCore */
XRayCore.quit()