Add connection from lan option
This commit is contained in:
@@ -216,6 +216,7 @@
|
|||||||
"directDnsDomainStrategy": "Direct DNS Domain Strategy",
|
"directDnsDomainStrategy": "Direct DNS Domain Strategy",
|
||||||
"mixedPort": "Mixed Port",
|
"mixedPort": "Mixed Port",
|
||||||
"localDnsPort": "Local DNS Port",
|
"localDnsPort": "Local DNS Port",
|
||||||
|
"allowConnectionFromLan": "Allow Connection from LAN",
|
||||||
"tunImplementation": "TUN Implementation",
|
"tunImplementation": "TUN Implementation",
|
||||||
"mtu": "MTU",
|
"mtu": "MTU",
|
||||||
"connectionTestUrl": "Connection Test URL",
|
"connectionTestUrl": "Connection Test URL",
|
||||||
|
|||||||
@@ -216,6 +216,7 @@
|
|||||||
"directDnsDomainStrategy": "حالت DNS مستقیم",
|
"directDnsDomainStrategy": "حالت DNS مستقیم",
|
||||||
"mixedPort": "پورت همه منظوره",
|
"mixedPort": "پورت همه منظوره",
|
||||||
"localDnsPort": "پورت DNS داخلی",
|
"localDnsPort": "پورت DNS داخلی",
|
||||||
|
"allowConnectionFromLan": "Allow Connection from LAN",
|
||||||
"tunImplementation": "مدل تونل",
|
"tunImplementation": "مدل تونل",
|
||||||
"mtu": "سایز بستهها",
|
"mtu": "سایز بستهها",
|
||||||
"connectionTestUrl": "لینک تست اتصال",
|
"connectionTestUrl": "لینک تست اتصال",
|
||||||
|
|||||||
@@ -214,6 +214,7 @@
|
|||||||
"directDnsDomainStrategy": "Стратегия прямого домена DNS",
|
"directDnsDomainStrategy": "Стратегия прямого домена DNS",
|
||||||
"mixedPort": "Смешанный порт",
|
"mixedPort": "Смешанный порт",
|
||||||
"localDnsPort": "Локальный порт DNS",
|
"localDnsPort": "Локальный порт DNS",
|
||||||
|
"allowConnectionFromLan": "Allow Connection from LAN",
|
||||||
"tunImplementation": "Реализация TUN",
|
"tunImplementation": "Реализация TUN",
|
||||||
"mtu": "MTU",
|
"mtu": "MTU",
|
||||||
"connectionTestUrl": "URL проверки подключения",
|
"connectionTestUrl": "URL проверки подключения",
|
||||||
|
|||||||
@@ -214,6 +214,7 @@
|
|||||||
"directDnsDomainStrategy": "Doğrudan DNS Domain Stratejisi",
|
"directDnsDomainStrategy": "Doğrudan DNS Domain Stratejisi",
|
||||||
"mixedPort": "Mixed Port",
|
"mixedPort": "Mixed Port",
|
||||||
"localDnsPort": "Yerel DNS Bağlantı Noktası",
|
"localDnsPort": "Yerel DNS Bağlantı Noktası",
|
||||||
|
"allowConnectionFromLan": "Allow Connection from LAN",
|
||||||
"tunImplementation": "TUN İmplementasyonu",
|
"tunImplementation": "TUN İmplementasyonu",
|
||||||
"mtu": "MTU",
|
"mtu": "MTU",
|
||||||
"connectionTestUrl": "Bağlantı Testi URL'i",
|
"connectionTestUrl": "Bağlantı Testi URL'i",
|
||||||
|
|||||||
@@ -214,6 +214,7 @@
|
|||||||
"directDnsDomainStrategy": "直连 DNS 域名策略",
|
"directDnsDomainStrategy": "直连 DNS 域名策略",
|
||||||
"mixedPort": "混合端口",
|
"mixedPort": "混合端口",
|
||||||
"localDnsPort": "本地 DNS 端口",
|
"localDnsPort": "本地 DNS 端口",
|
||||||
|
"allowConnectionFromLan": "Allow Connection from LAN",
|
||||||
"tunImplementation": "TUN 实现",
|
"tunImplementation": "TUN 实现",
|
||||||
"mtu": "MTU",
|
"mtu": "MTU",
|
||||||
"connectionTestUrl": "连接测试网址",
|
"connectionTestUrl": "连接测试网址",
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ class ConfigOptionRepositoryImpl
|
|||||||
enableTun: persisted.serviceMode == ServiceMode.tun,
|
enableTun: persisted.serviceMode == ServiceMode.tun,
|
||||||
setSystemProxy: persisted.serviceMode == ServiceMode.systemProxy,
|
setSystemProxy: persisted.serviceMode == ServiceMode.systemProxy,
|
||||||
bypassLan: persisted.bypassLan,
|
bypassLan: persisted.bypassLan,
|
||||||
|
allowConnectionFromLan: persisted.allowConnectionFromLan,
|
||||||
enableFakeDns: persisted.enableFakeDns,
|
enableFakeDns: persisted.enableFakeDns,
|
||||||
enableDnsRouting: persisted.enableDnsRouting,
|
enableDnsRouting: persisted.enableDnsRouting,
|
||||||
independentDnsCache: persisted.independentDnsCache,
|
independentDnsCache: persisted.independentDnsCache,
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ class ConfigOptionEntity with _$ConfigOptionEntity {
|
|||||||
@Default(true) bool enableClashApi,
|
@Default(true) bool enableClashApi,
|
||||||
@Default(6756) int clashApiPort,
|
@Default(6756) int clashApiPort,
|
||||||
@Default(false) bool bypassLan,
|
@Default(false) bool bypassLan,
|
||||||
|
@Default(false) bool allowConnectionFromLan,
|
||||||
@Default(false) bool enableFakeDns,
|
@Default(false) bool enableFakeDns,
|
||||||
@Default(true) bool enableDnsRouting,
|
@Default(true) bool enableDnsRouting,
|
||||||
@Default(true) bool independentDnsCache,
|
@Default(true) bool independentDnsCache,
|
||||||
@@ -96,6 +97,8 @@ class ConfigOptionEntity with _$ConfigOptionEntity {
|
|||||||
enableClashApi: patch.enableClashApi ?? enableClashApi,
|
enableClashApi: patch.enableClashApi ?? enableClashApi,
|
||||||
clashApiPort: patch.clashApiPort ?? clashApiPort,
|
clashApiPort: patch.clashApiPort ?? clashApiPort,
|
||||||
bypassLan: patch.bypassLan ?? bypassLan,
|
bypassLan: patch.bypassLan ?? bypassLan,
|
||||||
|
allowConnectionFromLan:
|
||||||
|
patch.allowConnectionFromLan ?? allowConnectionFromLan,
|
||||||
enableFakeDns: patch.enableFakeDns ?? enableFakeDns,
|
enableFakeDns: patch.enableFakeDns ?? enableFakeDns,
|
||||||
enableDnsRouting: patch.enableDnsRouting ?? enableDnsRouting,
|
enableDnsRouting: patch.enableDnsRouting ?? enableDnsRouting,
|
||||||
independentDnsCache: patch.independentDnsCache ?? independentDnsCache,
|
independentDnsCache: patch.independentDnsCache ?? independentDnsCache,
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ class ConfigOptionPatch with _$ConfigOptionPatch {
|
|||||||
bool? enableClashApi,
|
bool? enableClashApi,
|
||||||
int? clashApiPort,
|
int? clashApiPort,
|
||||||
bool? bypassLan,
|
bool? bypassLan,
|
||||||
|
bool? allowConnectionFromLan,
|
||||||
bool? enableFakeDns,
|
bool? enableFakeDns,
|
||||||
bool? enableDnsRouting,
|
bool? enableDnsRouting,
|
||||||
bool? independentDnsCache,
|
bool? independentDnsCache,
|
||||||
|
|||||||
@@ -257,6 +257,13 @@ class ConfigOptionsPage extends HookConsumerWidget {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
SwitchListTile(
|
||||||
|
title: Text(t.settings.config.allowConnectionFromLan),
|
||||||
|
value: options.allowConnectionFromLan,
|
||||||
|
onChanged: (value) => changeOption(
|
||||||
|
ConfigOptionPatch(allowConnectionFromLan: value),
|
||||||
|
),
|
||||||
|
),
|
||||||
const SettingsDivider(),
|
const SettingsDivider(),
|
||||||
SettingsSection(t.settings.config.section.tlsTricks),
|
SettingsSection(t.settings.config.section.tlsTricks),
|
||||||
SwitchListTile(
|
SwitchListTile(
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ class SingboxConfigOption with _$SingboxConfigOption {
|
|||||||
required bool enableTun,
|
required bool enableTun,
|
||||||
required bool setSystemProxy,
|
required bool setSystemProxy,
|
||||||
required bool bypassLan,
|
required bool bypassLan,
|
||||||
|
required bool allowConnectionFromLan,
|
||||||
required bool enableFakeDns,
|
required bool enableFakeDns,
|
||||||
required bool enableDnsRouting,
|
required bool enableDnsRouting,
|
||||||
required bool independentDnsCache,
|
required bool independentDnsCache,
|
||||||
|
|||||||
Reference in New Issue
Block a user