add basic routing and block ads, remove old geo assets

This commit is contained in:
Hiddify
2024-07-04 21:05:38 +02:00
parent 4bd3392f27
commit 40164efff8
3 changed files with 84 additions and 36 deletions

View File

@@ -6,18 +6,20 @@ import (
)
type ConfigOptions struct {
EnableFullConfig bool `json:"enable-full-config"`
LogLevel string `json:"log-level"`
EnableClashApi bool `json:"enable-clash-api"`
ClashApiPort uint16 `json:"clash-api-port"`
ClashApiSecret string `json:"web-secret"`
GeoIPPath string `json:"geoip-path"`
GeoSitePath string `json:"geosite-path"`
Rules []Rule `json:"rules"`
Warp WarpOptions `json:"warp"`
Warp2 WarpOptions `json:"warp2"`
Mux MuxOptions `json:"mux"`
TLSTricks TLSTricks `json:"tls-tricks"`
EnableFullConfig bool `json:"enable-full-config"`
LogLevel string `json:"log-level"`
EnableClashApi bool `json:"enable-clash-api"`
ClashApiPort uint16 `json:"clash-api-port"`
ClashApiSecret string `json:"web-secret"`
Region string `json:"region"`
BlockAds bool `json:"block-ads"`
// GeoIPPath string `json:"geoip-path"`
// GeoSitePath string `json:"geosite-path"`
Rules []Rule `json:"rules"`
Warp WarpOptions `json:"warp"`
Warp2 WarpOptions `json:"warp2"`
Mux MuxOptions `json:"mux"`
TLSTricks TLSTricks `json:"tls-tricks"`
DNSOptions
InboundOptions
URLTestOptions
@@ -124,9 +126,9 @@ func DefaultConfigOptions() *ConfigOptions {
EnableClashApi: true,
ClashApiPort: 6756,
ClashApiSecret: "",
GeoIPPath: "geoip.db",
GeoSitePath: "geosite.db",
Rules: []Rule{},
// GeoIPPath: "geoip.db",
// GeoSitePath: "geosite.db",
Rules: []Rule{},
Mux: MuxOptions{
Enable: false,
Padding: true,