mirror of
https://github.com/tachiyomiorg/tachiyomi-extensions-inspector.git
synced 2025-03-01 06:45:32 +01:00
refactor proxy
This commit is contained in:
parent
e6ba2a0066
commit
b1b1abad1d
@ -16,7 +16,7 @@ class ServerConfig(config: Config) : ConfigModule(config) {
|
|||||||
val port: Int by config
|
val port: Int by config
|
||||||
|
|
||||||
// proxy
|
// proxy
|
||||||
val socksProxy: Boolean by config
|
val socksProxyEnabled: Boolean by config
|
||||||
val socksProxyHost: String by config
|
val socksProxyHost: String by config
|
||||||
val socksProxyPort: String by config
|
val socksProxyPort: String by config
|
||||||
|
|
||||||
|
@ -95,7 +95,9 @@ fun applicationSetup() {
|
|||||||
System.setProperty("org.eclipse.jetty.LEVEL", "OFF")
|
System.setProperty("org.eclipse.jetty.LEVEL", "OFF")
|
||||||
|
|
||||||
// socks proxy settings
|
// socks proxy settings
|
||||||
System.getProperties()["proxySet"] = serverConfig.socksProxy.toString()
|
if (serverConfig.socksProxyEnabled) {
|
||||||
|
System.getProperties()["proxySet"] = "true"
|
||||||
System.getProperties()["socksProxyHost"] = serverConfig.socksProxyHost
|
System.getProperties()["socksProxyHost"] = serverConfig.socksProxyHost
|
||||||
System.getProperties()["socksProxyPort"] = serverConfig.socksProxyPort
|
System.getProperties()["socksProxyPort"] = serverConfig.socksProxyPort
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ server.ip = "0.0.0.0"
|
|||||||
server.port = 4567
|
server.port = 4567
|
||||||
|
|
||||||
# Socks5 proxy
|
# Socks5 proxy
|
||||||
server.socksProxy = false
|
server.socksProxyEnabled = false
|
||||||
server.socksProxyHost = ""
|
server.socksProxyHost = ""
|
||||||
server.socksProxyPort = ""
|
server.socksProxyPort = ""
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user