diff options
| author | AAA <theakhgar@gmail.com> | 2025-02-22 12:45:14 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-22 12:45:14 +0300 |
| commit | 1bbf31df9f61d92c5343e7867567171b6655c4de (patch) | |
| tree | 02d4b2c02a94a146e53d90e38e052df99dd4052c /web/service/setting.go | |
| parent | 49bfff9fa5a6acb50c8f51710a3e4005daf0ca32 (diff) | |
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 <root@vm3562019.stark-industries.solutions>
Co-authored-by: root <root@vm3688062.stark-industries.solutions>
Diffstat (limited to 'web/service/setting.go')
| -rw-r--r-- | web/service/setting.go | 16 |
1 files changed, 16 insertions, 0 deletions
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 { |
