Add proxy routing and sing-box support
This commit is contained in:
-1
@@ -1,6 +1,5 @@
|
||||
package eu.weblibre.flutter_tor
|
||||
|
||||
import IPtProxy.Controller
|
||||
import android.content.ComponentName
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
|
||||
+3
-3
@@ -2,9 +2,9 @@ package eu.weblibre.flutter_tor
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import IPtProxy.Controller
|
||||
import IPtProxy.IPtProxy
|
||||
import IPtProxy.OnTransportEvents
|
||||
import io.nekohasekai.IPtProxy.Controller
|
||||
import io.nekohasekai.IPtProxy.IPtProxy
|
||||
import io.nekohasekai.IPtProxy.OnTransportEvents
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
|
||||
@@ -19,11 +19,12 @@
|
||||
*/
|
||||
package eu.weblibre.flutter_tor
|
||||
|
||||
import IPtProxy.IPtProxy
|
||||
import eu.weblibre.flutter_tor.generated.IPtProxyController
|
||||
import eu.weblibre.flutter_tor.generated.TransportType
|
||||
import io.nekohasekai.IPtProxy.Controller
|
||||
import io.nekohasekai.IPtProxy.IPtProxy
|
||||
|
||||
class ProxyImpl(val controller: IPtProxy.Controller) : IPtProxyController {
|
||||
class ProxyImpl(val controller: Controller) : IPtProxyController {
|
||||
override fun start(proxyType: TransportType, proxy: String): Long {
|
||||
val type = when (proxyType) {
|
||||
TransportType.SNOWFLAKE -> IPtProxy.Snowflake
|
||||
@@ -55,4 +56,4 @@ class ProxyImpl(val controller: IPtProxy.Controller) : IPtProxyController {
|
||||
|
||||
controller.stop(type)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package eu.weblibre.flutter_tor
|
||||
|
||||
import eu.weblibre.flutter_tor.generated.TorConfiguration
|
||||
import IPtProxy.IPtProxy
|
||||
import io.nekohasekai.IPtProxy.IPtProxy
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user