Add auth support to socsk proxy

This commit is contained in:
Aria Moradi
2024-02-19 02:17:29 +03:30
parent af0dde5ae8
commit 532d5b9b9a
6 changed files with 30 additions and 3 deletions

View File

@@ -39,6 +39,8 @@ class SettingsMutation {
updateSetting(settings.socksProxyEnabled, serverConfig.socksProxyEnabled)
updateSetting(settings.socksProxyHost, serverConfig.socksProxyHost)
updateSetting(settings.socksProxyPort, serverConfig.socksProxyPort)
updateSetting(settings.socksProxyUsername, serverConfig.socksProxyUsername)
updateSetting(settings.socksProxyPassword, serverConfig.socksProxyPassword)
// webUI
updateSetting(settings.webUIFlavor?.uiName, serverConfig.webUIFlavor)

View File

@@ -23,6 +23,8 @@ interface Settings : Node {
val socksProxyEnabled: Boolean?
val socksProxyHost: String?
val socksProxyPort: String?
val socksProxyUsername: String?
val socksProxyPassword: String?
// webUI
// requires restart (found no way to mutate (serve + "unserve") served files during runtime), exclude for now
@@ -94,6 +96,8 @@ data class PartialSettingsType(
override val socksProxyEnabled: Boolean?,
override val socksProxyHost: String?,
override val socksProxyPort: String?,
override val socksProxyUsername: String?,
override val socksProxyPassword: String?,
// webUI
override val webUIFlavor: WebUIFlavor?,
override val initialOpenInBrowserEnabled: Boolean?,
@@ -152,6 +156,8 @@ class SettingsType(
override val socksProxyEnabled: Boolean,
override val socksProxyHost: String,
override val socksProxyPort: String,
override val socksProxyUsername: String,
override val socksProxyPassword: String,
// webUI
override val webUIFlavor: WebUIFlavor,
override val initialOpenInBrowserEnabled: Boolean,
@@ -209,6 +215,8 @@ class SettingsType(
config.socksProxyEnabled.value,
config.socksProxyHost.value,
config.socksProxyPort.value,
config.socksProxyUsername.value,
config.socksProxyPassword.value,
// webUI
WebUIFlavor.from(config.webUIFlavor.value),
config.initialOpenInBrowserEnabled.value,