Fix service.go to work with singbox 1.8.2

Drop deprecated feautre (Clash API: cache_file and store_selected)
Add feature (Cache File: path)
Add new idle_timeout field for URLTest outbound
Refactor outbound.go
Add feature to omit TLSTricks and Fragment on VLESS Reality configs.
This commit is contained in:
83hd4d
2024-01-22 04:07:32 +03:30
parent 1b0ed4afc1
commit bccb34c333
4 changed files with 78 additions and 50 deletions

View File

@@ -23,6 +23,7 @@ type ConfigOptions struct {
TUNStack string `json:"tun-stack"`
ConnectionTestUrl string `json:"connection-test-url"`
URLTestInterval option.Duration `json:"url-test-interval"`
URLTestIdleTimeout option.Duration `json:"url-test-idle-timeout"`
EnableClashApi bool `json:"enable-clash-api"`
ClashApiPort uint16 `json:"clash-api-port"`
EnableTun bool `json:"enable-tun"`
@@ -72,6 +73,7 @@ func DefaultConfigOptions() *ConfigOptions {
TUNStack: "mixed",
ConnectionTestUrl: "https://cp.cloudflare.com/",
URLTestInterval: option.Duration(10 * time.Minute),
URLTestIdleTimeout: option.Duration(100 * time.Minute),
EnableClashApi: true,
ClashApiPort: 6756,
EnableTun: true,