Add connection from lan option
This commit is contained in:
@@ -103,6 +103,7 @@ class ConfigOptionRepositoryImpl
|
||||
enableTun: persisted.serviceMode == ServiceMode.tun,
|
||||
setSystemProxy: persisted.serviceMode == ServiceMode.systemProxy,
|
||||
bypassLan: persisted.bypassLan,
|
||||
allowConnectionFromLan: persisted.allowConnectionFromLan,
|
||||
enableFakeDns: persisted.enableFakeDns,
|
||||
enableDnsRouting: persisted.enableDnsRouting,
|
||||
independentDnsCache: persisted.independentDnsCache,
|
||||
|
||||
@@ -37,6 +37,7 @@ class ConfigOptionEntity with _$ConfigOptionEntity {
|
||||
@Default(true) bool enableClashApi,
|
||||
@Default(6756) int clashApiPort,
|
||||
@Default(false) bool bypassLan,
|
||||
@Default(false) bool allowConnectionFromLan,
|
||||
@Default(false) bool enableFakeDns,
|
||||
@Default(true) bool enableDnsRouting,
|
||||
@Default(true) bool independentDnsCache,
|
||||
@@ -96,6 +97,8 @@ class ConfigOptionEntity with _$ConfigOptionEntity {
|
||||
enableClashApi: patch.enableClashApi ?? enableClashApi,
|
||||
clashApiPort: patch.clashApiPort ?? clashApiPort,
|
||||
bypassLan: patch.bypassLan ?? bypassLan,
|
||||
allowConnectionFromLan:
|
||||
patch.allowConnectionFromLan ?? allowConnectionFromLan,
|
||||
enableFakeDns: patch.enableFakeDns ?? enableFakeDns,
|
||||
enableDnsRouting: patch.enableDnsRouting ?? enableDnsRouting,
|
||||
independentDnsCache: patch.independentDnsCache ?? independentDnsCache,
|
||||
|
||||
@@ -31,6 +31,7 @@ class ConfigOptionPatch with _$ConfigOptionPatch {
|
||||
bool? enableClashApi,
|
||||
int? clashApiPort,
|
||||
bool? bypassLan,
|
||||
bool? allowConnectionFromLan,
|
||||
bool? enableFakeDns,
|
||||
bool? enableDnsRouting,
|
||||
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(),
|
||||
SettingsSection(t.settings.config.section.tlsTricks),
|
||||
SwitchListTile(
|
||||
|
||||
Reference in New Issue
Block a user