Skip to content

Add some general configs and translations #506

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,27 @@ data class ConfigurationOverride(
@SerialName("socks-port")
var socksPort: Int? = null,

@SerialName("redir-port")
var redirectPort: Int? = null,

@SerialName("tproxy-port")
var tproxyPort: Int? = null,

@SerialName("mixed-port")
var mixedPort: Int? = null,

@SerialName("authentication")
var authentication: List<String>? = null,

@SerialName("skip-auth-prefixes")
var skipAuthPrefixes: List<String>? = null,

@SerialName("allow-lan")
var allowLan: Boolean? = null,

@SerialName("bind-address")
var bindAddress: String? = null,

@SerialName("lan-allowed-ips")
var lanAllowedIps: List<String>? = null,

@SerialName("lan-disallowed-ips")
var lanDisallowedIps: List<String>? = null,

@SerialName("mode")
var mode: TunnelState.Mode? = null,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,22 +88,6 @@ class OverrideSettingsDesign(
empty = R.string.disabled,
)

editableText(
value = configuration::redirectPort,
adapter = NullableTextAdapter.Port,
title = R.string.redirect_port,
placeholder = R.string.dont_modify,
empty = R.string.disabled,
)

editableText(
value = configuration::tproxyPort,
adapter = NullableTextAdapter.Port,
title = R.string.tproxy_port,
placeholder = R.string.dont_modify,
empty = R.string.disabled,
)

editableText(
value = configuration::mixedPort,
adapter = NullableTextAdapter.Port,
Expand All @@ -119,18 +103,18 @@ class OverrideSettingsDesign(
placeholder = R.string.dont_modify,
)

selectableList(
value = configuration::allowLan,
values = booleanValues,
valuesText = booleanValuesText,
title = R.string.allow_lan,
editableTextList(
value = configuration::skipAuthPrefixes,
adapter = TextAdapter.String,
title = R.string.skip_auth_prefixes,
placeholder = R.string.dont_modify,
)

selectableList(
value = configuration::ipv6,
value = configuration::allowLan,
values = booleanValues,
valuesText = booleanValuesText,
title = R.string.ipv6,
title = R.string.allow_lan,
)

editableText(
Expand All @@ -141,6 +125,20 @@ class OverrideSettingsDesign(
empty = R.string.default_
)

editableTextList(
value = configuration::lanAllowedIps,
adapter = TextAdapter.String,
title = R.string.lan_allowed_ips,
placeholder = R.string.dont_modify,
)

editableTextList(
value = configuration::lanDisallowedIps,
adapter = TextAdapter.String,
title = R.string.lan_disallowed_ips,
placeholder = R.string.dont_modify,
)

editableText(
value = configuration::externalController,
adapter = NullableTextAdapter.String,
Expand Down Expand Up @@ -217,6 +215,13 @@ class OverrideSettingsDesign(
title = R.string.log_level,
)

selectableList(
value = configuration::ipv6,
values = booleanValues,
valuesText = booleanValuesText,
title = R.string.ipv6,
)

editableTextMap(
value = configuration::hosts,
keyAdapter = TextAdapter.String,
Expand Down
4 changes: 1 addition & 3 deletions design/src/main/res/values-ja-rJP/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,10 @@
<string name="prefer_h3">Prefer h3</string>
<string name="http_port">HTTPポート</string>
<string name="socks_port">SOCKSポート</string>
<string name="redirect_port">リダイレクトポート</string>
<string name="mixed_port">複合ポート</string>
<string name="tproxy_port">TProxyポート</string>
<string name="authentication">認証</string>
<string name="allow_lan">LANからの接続を許可</string>
<string name="bind_address">リスニングアドレス</string>
<string name="bind_address">バインドアドレス</string>
<string name="mode">モード</string>
<string name="log_level">ログレベル</string>
<string name="ipv6">IPv6</string>
Expand Down
4 changes: 1 addition & 3 deletions design/src/main/res/values-ko-rKR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,10 @@
<string name="prefer_h3">h3 선호</string>
<string name="http_port">HTTP 포트</string>
<string name="socks_port">Socks 포트</string>
<string name="redirect_port">Redirect 포트</string>
<string name="mixed_port">혼합 포트</string>
<string name="tproxy_port">TProxy 포트</string>
<string name="authentication">인증</string>
<string name="allow_lan">LAN 허용</string>
<string name="bind_address">수신 주소</string>
<string name="bind_address">바인드 주소</string>
<string name="mode">모드</string>
<string name="log_level">로그 레벨</string>
<string name="ipv6">IPv6</string>
Expand Down
4 changes: 1 addition & 3 deletions design/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,10 @@
<string name="prefer_h3">Предпочитать HTTP/3</string>
<string name="http_port">Порт HTTP</string>
<string name="socks_port">Порт Socks</string>
<string name="redirect_port">Порт перенаправления</string>
<string name="mixed_port">Смешанный порт</string>
<string name="tproxy_port">Порт TProxy</string>
<string name="authentication">Аутентификация</string>
<string name="allow_lan">Разрешить LAN</string>
<string name="bind_address">Задать адрес</string>
<string name="bind_address">привязать адрес</string>
<string name="mode">Режим</string>
<string name="log_level">Уровень логов</string>
<string name="ipv6">IPv6</string>
Expand Down
4 changes: 1 addition & 3 deletions design/src/main/res/values-vi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<string name="auto_update">Thời gian tự động cập nhật</string>
<string name="auto_update_minutes">Tự động cập nhật (Phút)</string>
<string name="behavior">Điều hướng</string>
<string name="bind_address">Địa chỉ ràng buộc</string>
<string name="bind_address">địa chỉ liên kết</string>
<string name="block_loopback">Chặn lặp</string>
<string name="block_loopback_summary">Chặn kết nối lặp lại</string>
<string name="browse_configuration_providers">Duyệt qua tệp cấu hình và nhà cung cấp</string>
Expand Down Expand Up @@ -181,7 +181,6 @@
<string name="proxy">Proxy</string>
<string name="proxy_empty_tips">Không có nhóm nào được hiển thị</string>
<string name="recently">Vừa xong</string>
<string name="redirect_port">Cổng Redirect</string>
<string name="reinstall">Cài đặt lại</string>
<string name="rename">Đổi tên</string>
<string name="reset">Đặt lại</string>
Expand Down Expand Up @@ -219,7 +218,6 @@
<string name="tap_to_start">Chạm để kết nối</string>
<string name="tips_help">Clash Meta là một phần mềm miễn phí và chúng tôi KHÔNG cung cấp bất kỳ dịch vụ trả phí nào cho nó</string>
<string name="tips_properties">Chỉ chấp nhận cấu hình Clash bao gồm Proxy và Quy tắc</string>
<string name="tproxy_port">Cổng TProxy</string>
<string name="unable_to_start_vpn">Không thể khởi động thành phần VPN</string>
<string name="unavailable">Không có sẵn</string>
<string name="update">Cập nhật</string>
Expand Down
17 changes: 11 additions & 6 deletions design/src/main/res/values-zh-rHK/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
<string name="invalid_url">無效的 URL</string>
<string name="logcat">Logcat</string>
<string name="logs">日誌</string>
<string name="mode">模式</string>
<string name="name">名稱</string>
<string name="network">網絡</string>
<string name="new_profile">新配置</string>
Expand Down Expand Up @@ -106,8 +105,17 @@
<string name="http_port">HTTP 端口</string>
<string name="socks_port">Socks 端口</string>
<string name="mixed_port">複合端口</string>
<string name="allow_lan">允許來自局域網的連接</string>
<string name="bind_address">監聽地址</string>
<string name="authentication">代理端口認證</string>
<string name="skip_auth_prefixes">免認證前綴</string>
<string name="allow_lan">允許來自私有網絡的連接</string>
<string name="bind_address">綁定地址</string>
<string name="lan_allowed_ips">允許連接的私有網絡 IP 段</string>
<string name="lan_disallowed_ips">不允許連接的私有網絡 IP 段</string>
<string name="external_controller">外部控制器</string>
<string name="external_controller_tls">外部控制器 TLS</string>
<string name="allow_origins">外部控制器允許來源清單</string>
<string name="allow_private_network">外部控制器允許私有網絡地址</string>
<string name="mode">模式</string>
<string name="log_level">日誌級別</string>
<string name="ipv6">IPv6</string>
<string name="hosts">Hosts</string>
Expand Down Expand Up @@ -157,11 +165,8 @@
<string name="system_proxy">系統代理</string>
<string name="system_proxy_summary">為 VpnService 附加 HTTP 代理</string>
<string name="dont_modify">不修改</string>
<string name="redirect_port">Redirect 端口</string>
<string name="tproxy_port">TProxy 端口</string>
<string name="reset">重置</string>
<string name="use_hosts">使用 Hosts</string>
<string name="authentication">認證</string>
<string name="domain_fallback">域名 Fallback</string>
<string name="empty">置空</string>
<string name="import_from_clipboard">從剪切板導入</string>
Expand Down
17 changes: 11 additions & 6 deletions design/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
<string name="invalid_url">無效 URL</string>
<string name="logcat">Logcat</string>
<string name="logs">日誌</string>
<string name="mode">模式</string>
<string name="name">名稱</string>
<string name="network">網路</string>
<string name="new_profile">新設定檔</string>
Expand Down Expand Up @@ -106,8 +105,17 @@
<string name="http_port">HTTP 埠</string>
<string name="socks_port">Socks 埠</string>
<string name="mixed_port">Mixed 埠</string>
<string name="allow_lan">允許來自區域網路的連線</string>
<string name="bind_address">監聽位址</string>
<string name="authentication">代理埠認證</string>
<string name="skip_auth_prefixes">免認證前綴</string>
<string name="allow_lan">允許來自區域網路的連接</string>
<string name="bind_address">綁定位址</string>
<string name="lan_allowed_ips">允許連接的區域網路 IP 段</string>
<string name="lan_disallowed_ips">不允許連接的區域網路 IP 段</string>
<string name="external_controller">外部控制器</string>
<string name="external_controller_tls">外部控制器 TLS</string>
<string name="allow_origins">外部控制器允許來源清單</string>
<string name="allow_private_network">外部控制器允許專用網路位址</string>
<string name="mode">模式</string>
<string name="log_level">日誌層次</string>
<string name="ipv6">IPv6</string>
<string name="hosts">Hosts</string>
Expand Down Expand Up @@ -157,11 +165,8 @@
<string name="system_proxy">作業系統 Proxy</string>
<string name="system_proxy_summary">為 VpnService 附加 HTTP Proxy</string>
<string name="dont_modify">不修改</string>
<string name="redirect_port">Redirect 埠</string>
<string name="tproxy_port">TProxy 埠</string>
<string name="reset">重設</string>
<string name="use_hosts">使用 Hosts</string>
<string name="authentication">認證</string>
<string name="domain_fallback">域名 Fallback</string>
<string name="empty">置空</string>
<string name="import_from_clipboard">從剪貼簿匯入</string>
Expand Down
15 changes: 10 additions & 5 deletions design/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
<string name="invalid_url">无效的 URL</string>
<string name="logcat">Logcat</string>
<string name="logs">日志</string>
<string name="mode">模式</string>
<string name="name">名称</string>
<string name="network">网络</string>
<string name="new_profile">新配置</string>
Expand Down Expand Up @@ -109,8 +108,17 @@
<string name="http_port">HTTP 端口</string>
<string name="socks_port">Socks 端口</string>
<string name="mixed_port">复合端口</string>
<string name="authentication">代理端口认证</string>
<string name="skip_auth_prefixes">免认证前缀</string>
<string name="allow_lan">允许来自局域网的连接</string>
<string name="bind_address">监听地址</string>
<string name="bind_address">绑定地址</string>
<string name="lan_allowed_ips">允许连接的局域网 IP 段</string>
<string name="lan_disallowed_ips">不允许连接的局域网 IP 段</string>
<string name="external_controller">外部控制器</string>
<string name="external_controller_tls">外部控制器 TLS</string>
<string name="allow_origins">外部控制器允许来源列表</string>
<string name="allow_private_network">外部控制器允许私有网络地址</string>
<string name="mode">模式</string>
<string name="log_level">日志级别</string>
<string name="ipv6">IPv6</string>
<string name="hosts">Hosts</string>
Expand Down Expand Up @@ -163,11 +171,8 @@
<string name="system_proxy">系统代理</string>
<string name="system_proxy_summary">为 VpnService 附加 HTTP 代理</string>
<string name="dont_modify">不修改</string>
<string name="redirect_port">Redirect 端口</string>
<string name="tproxy_port">TProxy 端口</string>
<string name="reset">重置</string>
<string name="use_hosts">使用 Hosts</string>
<string name="authentication">认证</string>
<string name="domain_fallback">域名 Fallback</string>
<string name="empty">置空</string>
<string name="import_from_clipboard">从剪切板导入</string>
Expand Down
13 changes: 7 additions & 6 deletions design/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,20 +139,21 @@
<string name="prefer_h3">Prefer h3</string>
<string name="http_port">HTTP Port</string>
<string name="socks_port">Socks Port</string>
<string name="redirect_port">Redirect Port</string>
<string name="mixed_port">Mixed Port</string>
<string name="tproxy_port">TProxy Port</string>
<string name="authentication">Authentication</string>
<string name="authentication">Proxy Ports Authentication</string>
<string name="skip_auth_prefixes">Skip Auth Prefixes</string>
<string name="allow_lan">Allow LAN</string>
<string name="bind_address">Bind Address</string>
<string name="mode">Mode</string>
<string name="log_level">Log Level</string>
<string name="ipv6">IPv6</string>
<string name="lan_allowed_ips">Lan Allowed IPs</string>
<string name="lan_disallowed_ips">Lan Disallowed IPs</string>
<string name="external_controller">External Controller</string>
<string name="external_controller_tls">External Controller TLS</string>
<string name="allow_origins">External Controller Allow Origins</string>
<string name="allow_private_network">External Controller Allow Private Network</string>
<string name="secret">Secret</string>
<string name="mode">Mode</string>
<string name="log_level">Log Level</string>
<string name="ipv6">IPv6</string>
<string name="hosts">Hosts</string>
<string name="_new">New</string>
<string name="value">Value</string>
Expand Down
Loading