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