Skip to content

Commit

Permalink
fix: find process mode override
Browse files Browse the repository at this point in the history
  • Loading branch information
riolurs committed Nov 1, 2023
1 parent 0219392 commit e193052
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ data class ConfigurationOverride(
@SerialName("tcp-concurrent")
var tcpConcurrent: Boolean? = null,

@SerialName("enable-process")
var enableProcess: Boolean? = null,
@SerialName("find-process-mode")
var findProcessMode: FindProcessMode? = null,

@SerialName("dns")
val dns: Dns = Dns(),
Expand Down Expand Up @@ -128,6 +128,17 @@ data class ConfigurationOverride(
var appendSystemDns: Boolean? = null
)

@Serializable
enum class FindProcessMode {
@SerialName("off")
Off,

@SerialName("strict")
Strict,

@SerialName("always")
Always,
}
@Serializable
enum class DnsEnhancedMode {
@SerialName("normal")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,23 @@ class MetaFeatureSettingsDesign(
)

selectableList(
value = configuration::enableProcess,
values = booleanValues,
valuesText = booleanValuesText,
title = R.string.enable_process,
)
value = configuration::findProcessMode,
values = arrayOf(
null,
ConfigurationOverride.FindProcessMode.Off,
ConfigurationOverride.FindProcessMode.Strict,
ConfigurationOverride.FindProcessMode.Always
),
valuesText = arrayOf(
R.string.dont_modify,
R.string.off,
R.string.strict,
R.string.always,
),
title = R.string.find_process_mode,
) {

}

category(R.string.dns)

Expand Down
5 changes: 4 additions & 1 deletion design/src/main/res/values-ja-rJP/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@
<string name="force_enable">強制的に有効</string>
<string name="mapping">Real-IPをドメインマッピング</string>
<string name="fakeip">Fake-IPをドメインマッピング</string>
<string name="off">OFF</string>
<string name="strict">Strict</string>
<string name="always">Always</string>
<string name="system_apps">システムアプリ</string>
<string name="filter">フィルタ</string>
<string name="package_name">パッケージ名</string>
Expand Down Expand Up @@ -220,7 +223,7 @@
<string name="unified_delay">Unified Delay</string>
<string name="geodata_mode">Geodata Mode</string>
<string name="tcp_concurrent">TCP Concurrent</string>
<string name="enable_process">Enable Process</string>
<string name="find_process_mode">Find Process Mode</string>
<string name="sniffer_setting">Sniffer Setting</string>
<string name="sniffer">Sniffer</string>
<string name="sniffing">Sniffer Mode</string>
Expand Down
5 changes: 4 additions & 1 deletion design/src/main/res/values-ko-rKR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@
<string name="force_enable">강제 활성화</string>
<string name="mapping">Real-IP - 도메인 매핑</string>
<string name="fakeip">Fake-IP - 도메인 매핑</string>
<string name="off">강제 종료</string>
<string name="strict">구성 설정에 따름</string>
<string name="always">강제로 켜기</string>
<string name="system_apps">시스템 앱</string>
<string name="filter">필터</string>
<string name="package_name">패키지 이름</string>
Expand Down Expand Up @@ -220,7 +223,7 @@
<string name="unified_delay">Unified Delay</string>
<string name="geodata_mode">Geodata 모드</string>
<string name="tcp_concurrent">TCP Concorrent</string>
<string name="enable_process">프로세스 실행</string>
<string name="find_process_mode">프로세스 모드 찾기</string>
<string name="sniffer_setting">Sniffer 설정</string>
<string name="sniffer">Sniffer</string>
<string name="sniffing">Sniffer 모드</string>
Expand Down
5 changes: 4 additions & 1 deletion design/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@

<string name="mapping">Сопоставление реальных IP доменам</string>
<string name="fakeip">Сопоставление подставных IP доменам</string>
<string name="off">Принудительно закрыть</string>
<string name="strict">Следовать настройкам конфигурации</string>
<string name="always">Принудительно включить</string>

<string name="system_apps">Системные приложения</string>
<string name="filter">Фильтр</string>
Expand Down Expand Up @@ -280,7 +283,7 @@
<string name="unified_delay">Унифицированная задержка</string>
<string name="geodata_mode">Режим геоданных</string>
<string name="tcp_concurrent">Многопоточный TCP</string>
<string name="enable_process">Использовать процессы в правилах</string>
<string name="find_process_mode">Найти режим процесса</string>

<string name="sniffer_setting">Настройки перехвата доменов</string>
<string name="sniffer">Перехват доменов</string>
Expand Down
5 changes: 4 additions & 1 deletion design/src/main/res/values-zh-rHK/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@
<string name="use_built_in">使用內置</string>
<string name="mapping">Real-IP 至 域名映射</string>
<string name="fakeip">Fake-IP 至 域名映射</string>
<string name="off">強制關閉</string>
<string name="strict">跟隨配置設定</string>
<string name="always">強制開啟</string>
<string name="sort">排序</string>
<string name="layout">佈局</string>
<string name="single">單列</string>
Expand Down Expand Up @@ -216,7 +219,7 @@
<string name="unified_delay">Unified Delay</string>
<string name="geodata_mode">Geodata Mode</string>
<string name="tcp_concurrent">TCP Concurrent</string>
<string name="enable_process">Enable Process</string>
<string name="find_process_mode">Find Process Mode</string>
<string name="sniffer_setting">Sniffer Setting</string>
<string name="sniffer">Sniffer</string>
<string name="sniffing">Sniffer Mode</string>
Expand Down
5 changes: 4 additions & 1 deletion design/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@
<string name="use_built_in">使用內建</string>
<string name="mapping">Real-IP 至域名映射</string>
<string name="fakeip">Fake-IP 至域名映射</string>
<string name="off">強制關閉</string>
<string name="strict">跟隨配置設定</string>
<string name="always">強制開啟</string>
<string name="sort">排序</string>
<string name="layout">佈局</string>
<string name="single">單欄</string>
Expand Down Expand Up @@ -216,7 +219,7 @@
<string name="unified_delay">Unified Delay</string>
<string name="geodata_mode">Geodata Mode</string>
<string name="tcp_concurrent">TCP Concurrent</string>
<string name="enable_process">Enable Process</string>
<string name="find_process_mode">Find Process Mode</string>
<string name="sniffer_setting">Sniffer Setting</string>
<string name="sniffer">Sniffer</string>
<string name="sniffing">Sniffer Mode</string>
Expand Down
5 changes: 4 additions & 1 deletion design/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@
<string name="use_built_in">使用内置</string>
<string name="mapping">Real-IP 至 域名映射</string>
<string name="fakeip">Fake-IP 至 域名映射</string>
<string name="off">OFF</string>
<string name="strict">Strict</string>
<string name="always">Always</string>
<string name="sort">排序</string>
<string name="layout">布局</string>
<string name="single">单列</string>
Expand Down Expand Up @@ -219,7 +222,7 @@
<string name="unified_delay">Unified Delay</string>
<string name="geodata_mode">Geodata Mode</string>
<string name="tcp_concurrent">TCP Concurrent</string>
<string name="enable_process">Enable Process</string>
<string name="find_process_mode">Find Process Mode</string>
<string name="sniffer_setting">Sniffer Setting</string>
<string name="sniffer">Sniffer</string>
<string name="sniffing">Sniffer Mode</string>
Expand Down
6 changes: 5 additions & 1 deletion design/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@
<string name="mapping">Real-IP to domain mapping</string>
<string name="fakeip">Fake-IP to domain mapping</string>

<string name="off">OFF</string>
<string name="strict">Strict</string>
<string name="always">Always</string>

<string name="system_apps">System Apps</string>
<string name="filter">Filter</string>
<string name="package_name">Package Name</string>
Expand Down Expand Up @@ -280,7 +284,7 @@
<string name="unified_delay">Unified Delay</string>
<string name="geodata_mode">Geodata Mode</string>
<string name="tcp_concurrent">TCP Concurrent</string>
<string name="enable_process">Enable Process</string>
<string name="find_process_mode">Find Process Mode</string>

<string name="sniffer_setting">Sniffer Setting</string>
<string name="sniffer">Sniffer</string>
Expand Down

0 comments on commit e193052

Please sign in to comment.