Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make TOML and INI formats switchable in a single configuration #124

Merged
merged 6 commits into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ require (
github.com/lxn/walk v0.0.0-20210112085537-c389da54e794
github.com/lxn/win v0.0.0-20210218163916-a377121e959e
github.com/miekg/dns v1.1.58
github.com/pelletier/go-toml/v2 v2.1.0
github.com/samber/lo v1.39.0
golang.org/x/sys v0.17.0
golang.org/x/text v0.14.0
Expand All @@ -33,7 +34,6 @@ require (
github.com/klauspost/cpuid/v2 v2.0.6 // indirect
github.com/klauspost/reedsolomon v1.9.15 // indirect
github.com/onsi/ginkgo/v2 v2.11.0 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pion/dtls/v2 v2.2.7 // indirect
github.com/pion/logging v0.2.2 // indirect
github.com/pion/stun v0.6.1 // indirect
Expand Down Expand Up @@ -64,4 +64,4 @@ require (
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace github.com/lxn/walk => github.com/koho/frpmgr v0.0.0-20240226182702-de6a27e2c5f6
replace github.com/lxn/walk => github.com/koho/frpmgr v0.0.0-20240309173424-3817a91bcc39
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ github.com/klauspost/cpuid/v2 v2.0.6 h1:dQ5ueTiftKxp0gyjKSx5+8BtPWkyQbd95m8Gys/R
github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/reedsolomon v1.9.15 h1:g2erWKD2M6rgnPf89fCji6jNlhMKMdXcuNHMW1SYCIo=
github.com/klauspost/reedsolomon v1.9.15/go.mod h1:eqPAcE7xar5CIzcdfwydOEdcmchAKAP/qs14y4GCBOk=
github.com/koho/frpmgr v0.0.0-20240226182702-de6a27e2c5f6 h1:KYUbVjfTDAQtLFQ3P/NC2kMiAkFS6wOSGymb8s2tqRQ=
github.com/koho/frpmgr v0.0.0-20240226182702-de6a27e2c5f6/go.mod h1:CdksCbC3x4Swi/ePNXCeg08K1i3XdIVdy3o7elo92k8=
github.com/koho/frpmgr v0.0.0-20240309173424-3817a91bcc39 h1:xn1qQrWzrxVNwnxVmHmKPyoPbYKWK7WmefftOad86Z0=
github.com/koho/frpmgr v0.0.0-20240309173424-3817a91bcc39/go.mod h1:CdksCbC3x4Swi/ePNXCeg08K1i3XdIVdy3o7elo92k8=
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
Expand Down
1,209 changes: 630 additions & 579 deletions i18n/catalog.go

Large diffs are not rendered by default.

111 changes: 92 additions & 19 deletions i18n/locales/en-US/messages.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -932,23 +932,16 @@
"fuzzy": true
},
{
"id": "TCP Mux",
"message": "TCP Mux",
"translation": "TCP Mux",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "Mux Keepalive",
"message": "Mux Keepalive",
"translation": "Mux Keepalive",
"id": "Source Address",
"message": "Source Address",
"translation": "Source Address",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "Source Address",
"message": "Source Address",
"translation": "Source Address",
"id": "TCP Mux",
"message": "TCP Mux",
"translation": "TCP Mux",
"translatorComment": "Copied from source.",
"fuzzy": true
},
Expand All @@ -966,6 +959,13 @@
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "Use legacy format config file",
"message": "Use legacy format config file",
"translation": "Use legacy format config file",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "Metadata",
"message": "Metadata",
Expand Down Expand Up @@ -1018,6 +1018,23 @@
],
"fuzzy": true
},
{
"id": "Unable to upgrade your config file due to proxy conversion failure, please check the proxy config and try again.\n\nBad proxy: {Name}",
"message": "Unable to upgrade your config file due to proxy conversion failure, please check the proxy config and try again.\n\nBad proxy: {Name}",
"translation": "Unable to upgrade your config file due to proxy conversion failure, please check the proxy config and try again.\n\nBad proxy: {Name}",
"translatorComment": "Copied from source.",
"placeholders": [
{
"id": "Name",
"string": "%[1]s",
"type": "string",
"underlyingType": "string",
"argNum": 1,
"expr": "v.Name"
}
],
"fuzzy": true
},
{
"id": "New Proxy",
"message": "New Proxy",
Expand Down Expand Up @@ -1430,6 +1447,62 @@
],
"fuzzy": true
},
{
"id": "Bind port is required.",
"message": "Bind port is required.",
"translation": "Bind port is required.",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "Requires local port or plugin.",
"message": "Requires local port or plugin.",
"translation": "Requires local port or plugin.",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "Invalid local port.",
"message": "Invalid local port.",
"translation": "Invalid local port.",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "Health check url is required.",
"message": "Health check url is required.",
"translation": "Health check url is required.",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "The plugin does not support range ports.",
"message": "The plugin does not support range ports.",
"translation": "The plugin does not support range ports.",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "Invalid remote port.",
"message": "Invalid remote port.",
"translation": "Invalid remote port.",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "The number of local ports should be the same as the number of remote ports.",
"message": "The number of local ports should be the same as the number of remote ports.",
"translation": "The number of local ports should be the same as the number of remote ports.",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "Custom domains and subdomain should have at least one of these set.",
"message": "Custom domains and subdomain should have at least one of these set.",
"translation": "Custom domains and subdomain should have at least one of these set.",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "Open Log Folder",
"message": "Open Log Folder",
Expand Down Expand Up @@ -1773,9 +1846,9 @@
"fuzzy": true
},
{
"id": "Enable",
"message": "Enable",
"translation": "Enable",
"id": "Disable",
"message": "Disable",
"translation": "Disable",
"translatorComment": "Copied from source.",
"fuzzy": true
},
Expand Down Expand Up @@ -1883,9 +1956,9 @@
"fuzzy": true
},
{
"id": "Disable",
"message": "Disable",
"translation": "Disable",
"id": "Enable",
"message": "Enable",
"translation": "Enable",
"translatorComment": "Copied from source.",
"fuzzy": true
},
Expand Down
87 changes: 71 additions & 16 deletions i18n/locales/es-ES/messages.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -699,21 +699,16 @@
"message": "Advanced",
"translation": "Avanzado"
},
{
"id": "TCP Mux",
"message": "TCP Mux",
"translation": "Mux TCP"
},
{
"id": "Mux Keepalive",
"message": "Mux Keepalive",
"translation": "Mux Keepalive"
},
{
"id": "Source Address",
"message": "Source Address",
"translation": "Dirección de la fuente"
},
{
"id": "TCP Mux",
"message": "TCP Mux",
"translation": "Mux TCP"
},
{
"id": "Exit after login failure",
"message": "Exit after login failure",
Expand All @@ -724,6 +719,11 @@
"message": "Disable auto-start at boot",
"translation": "Desactivar el inicio automático al arrancar"
},
{
"id": "Use legacy format config file",
"message": "Use legacy format config file",
"translation": "Usar archivo de configuración de formato heredado"
},
{
"id": "Metadata",
"message": "Metadata",
Expand Down Expand Up @@ -764,6 +764,21 @@
}
]
},
{
"id": "Unable to upgrade your config file due to proxy conversion failure, please check the proxy config and try again.\n\nBad proxy: {Name}",
"message": "Unable to upgrade your config file due to proxy conversion failure, please check the proxy config and try again.\n\nBad proxy: {Name}",
"translation": "No se puede actualizar su archivo de configuración debido a un error en la conversión del proxy. Verifique la configuración del proxy e inténtelo nuevamente.\n\nProxy incorrecto: {Name}",
"placeholders": [
{
"id": "Name",
"string": "%[1]s",
"type": "string",
"underlyingType": "string",
"argNum": 1,
"expr": "v.Name"
}
]
},
{
"id": "New Proxy",
"message": "New Proxy",
Expand Down Expand Up @@ -1064,6 +1079,46 @@
}
]
},
{
"id": "Bind port is required.",
"message": "Bind port is required.",
"translation": "Se requiere puerto de vinculación."
},
{
"id": "Requires local port or plugin.",
"message": "Requires local port or plugin.",
"translation": "Requiere puerto local o complemento."
},
{
"id": "Invalid local port.",
"message": "Invalid local port.",
"translation": "Puerto local no válido."
},
{
"id": "Health check url is required.",
"message": "Health check url is required.",
"translation": "Se requiere la URL de verificación de estado."
},
{
"id": "The plugin does not support range ports.",
"message": "The plugin does not support range ports.",
"translation": "El complemento no admite puertos de rango."
},
{
"id": "Invalid remote port.",
"message": "Invalid remote port.",
"translation": "Puerto remoto no válido."
},
{
"id": "The number of local ports should be the same as the number of remote ports.",
"message": "The number of local ports should be the same as the number of remote ports.",
"translation": "La cantidad de puertos locales debe ser la misma que la cantidad de puertos remotos."
},
{
"id": "Custom domains and subdomain should have at least one of these set.",
"message": "Custom domains and subdomain should have at least one of these set.",
"translation": "Los dominios y subdominios personalizados deben tener al menos uno de estos configurados."
},
{
"id": "Open Log Folder",
"message": "Open Log Folder",
Expand Down Expand Up @@ -1315,9 +1370,9 @@
"translation": "Servidor de archivos HTTP"
},
{
"id": "Enable",
"message": "Enable",
"translation": "Habilitar"
"id": "Disable",
"message": "Disable",
"translation": "Deshabilitar"
},
{
"id": "Open Config",
Expand Down Expand Up @@ -1405,9 +1460,9 @@
]
},
{
"id": "Disable",
"message": "Disable",
"translation": "Deshabilitar"
"id": "Enable",
"message": "Enable",
"translation": "Habilitar"
},
{
"id": "Passive Port Range",
Expand Down
Loading