new: add tproxy
This commit is contained in:
@@ -372,6 +372,7 @@
|
||||
"directDnsAddress": "Direct DNS",
|
||||
"directDnsDomainStrategy": "Direct DNS Domain Strategy",
|
||||
"mixedPort": "Mixed Port",
|
||||
"tproxyPort": "Transparent Proxy Port",
|
||||
"localDnsPort": "Local DNS Port",
|
||||
"allowConnectionFromLan": "Share VPN in Local Network",
|
||||
"tunImplementation": "TUN Implementation",
|
||||
|
||||
@@ -79,6 +79,12 @@ abstract class ConfigOptions {
|
||||
validator: (value) => isPort(value.toString()),
|
||||
);
|
||||
|
||||
static final tproxyPort = PreferencesNotifier.create<int, int>(
|
||||
"tproxy-port",
|
||||
2335,
|
||||
validator: (value) => isPort(value.toString()),
|
||||
);
|
||||
|
||||
static final localDnsPort = PreferencesNotifier.create<int, int>(
|
||||
"local-dns-port",
|
||||
6450,
|
||||
@@ -305,6 +311,7 @@ abstract class ConfigOptions {
|
||||
"direct-dns-address": directDnsAddress,
|
||||
"direct-dns-domain-strategy": directDnsDomainStrategy,
|
||||
"mixed-port": mixedPort,
|
||||
"tproxy-port": tproxyPort,
|
||||
"local-dns-port": localDnsPort,
|
||||
"tun-implementation": tunImplementation,
|
||||
"mtu": mtu,
|
||||
@@ -393,6 +400,7 @@ abstract class ConfigOptions {
|
||||
directDnsAddress: ref.watch(directDnsAddress),
|
||||
directDnsDomainStrategy: ref.watch(directDnsDomainStrategy),
|
||||
mixedPort: ref.watch(mixedPort),
|
||||
tproxyPort: ref.watch(tproxyPort),
|
||||
localDnsPort: ref.watch(localDnsPort),
|
||||
tunImplementation: ref.watch(tunImplementation),
|
||||
mtu: ref.watch(mtu),
|
||||
|
||||
@@ -266,6 +266,14 @@ class ConfigOptionsPage extends HookConsumerWidget {
|
||||
digitsOnly: true,
|
||||
validateInput: isPort,
|
||||
),
|
||||
ValuePreferenceWidget(
|
||||
value: ref.watch(ConfigOptions.tproxyPort),
|
||||
preferences: ref.watch(ConfigOptions.tproxyPort.notifier),
|
||||
title: t.config.tproxyPort,
|
||||
inputToValue: int.tryParse,
|
||||
digitsOnly: true,
|
||||
validateInput: isPort,
|
||||
),
|
||||
ValuePreferenceWidget(
|
||||
value: ref.watch(ConfigOptions.localDnsPort),
|
||||
preferences: ref.watch(ConfigOptions.localDnsPort.notifier),
|
||||
|
||||
2
libcore
2
libcore
Submodule libcore updated: aab998fae9...a5ca136a4c
Reference in New Issue
Block a user