mirror of
https://github.com/tachiyomiorg/tachiyomi-extensions-inspector.git
synced 2025-02-28 22:43:38 +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
|
||||
|
||||
// proxy
|
||||
val socksProxy: Boolean by config
|
||||
val socksProxyEnabled: Boolean by config
|
||||
val socksProxyHost: String by config
|
||||
val socksProxyPort: String by config
|
||||
|
||||
|
@ -95,7 +95,9 @@ fun applicationSetup() {
|
||||
System.setProperty("org.eclipse.jetty.LEVEL", "OFF")
|
||||
|
||||
// socks proxy settings
|
||||
System.getProperties()["proxySet"] = serverConfig.socksProxy.toString()
|
||||
if (serverConfig.socksProxyEnabled) {
|
||||
System.getProperties()["proxySet"] = "true"
|
||||
System.getProperties()["socksProxyHost"] = serverConfig.socksProxyHost
|
||||
System.getProperties()["socksProxyPort"] = serverConfig.socksProxyPort
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ server.ip = "0.0.0.0"
|
||||
server.port = 4567
|
||||
|
||||
# Socks5 proxy
|
||||
server.socksProxy = false
|
||||
server.socksProxyEnabled = false
|
||||
server.socksProxyHost = ""
|
||||
server.socksProxyPort = ""
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user