From 1bbf31df9f61d92c5343e7867567171b6655c4de Mon Sep 17 00:00:00 2001 From: AAA Date: Sat, 22 Feb 2025 13:15:14 +0330 Subject: feat(externalTrafficJob): External Traffic Inform (#2660) * Add Setting entity + GUI field in panel settings * Add a missing 'Traffic' in InformEnabale field * Add ExternalTrafficURL Post request call * Add translation + cleanup * Move options to General tab --------- Co-authored-by: root Co-authored-by: root --- web/service/setting.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'web/service') diff --git a/web/service/setting.go b/web/service/setting.go index d238c33d..4fe06517 100644 --- a/web/service/setting.go +++ b/web/service/setting.go @@ -496,6 +496,22 @@ func (s *SettingService) SetWarp(data string) error { return s.setString("warp", data) } +func (s *SettingService) GetExternalTrafficInformEnable() (bool, error) { + return s.getBool("externalTrafficInformEnable") +} + +func (s *SettingService) SetExternalTrafficInformEnable(value bool) error { + return s.setBool("externalTrafficInformEnable", value) +} + +func (s *SettingService) GetExternalTrafficInformURI() (string, error) { + return s.getString("externalTrafficInformURI") +} + +func (s *SettingService) SetExternalTrafficInformURI(InformURI string) error { + return s.setString("externalTrafficInformURI", InformURI) +} + func (s *SettingService) GetIpLimitEnable() (bool, error) { accessLogPath, err := xray.GetAccessLogPath() if err != nil { -- cgit v1.2.3