new: Big Change, Add support for Extensions 😍

This commit is contained in:
hiddify
2024-09-28 20:31:38 +02:00
parent 1f485e1193
commit 3a508b7929
44 changed files with 8946 additions and 619 deletions

View File

@@ -68,7 +68,7 @@ func readAndBuildConfig(hiddifySettingPath string, configPath string, defaultCon
}
if hiddifySettingPath != "" {
hiddifyconfig, err = readHiddifyOptionsAt(hiddifySettingPath)
hiddifyconfig, err = ReadHiddifyOptionsAt(hiddifySettingPath)
if err != nil {
return result, err
}
@@ -96,7 +96,7 @@ func readConfigContent(configPath string) (ConfigResult, error) {
fmt.Println("Error creating request:", err)
return ConfigResult{}, err
}
req.Header.Set("User-Agent", "HiddifyNext/17.5.0 ("+runtime.GOOS+") like ClashMeta v2ray sing-box")
req.Header.Set("User-Agent", "HiddifyNext/2.3.1 ("+runtime.GOOS+") like ClashMeta v2ray sing-box")
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error making GET request:", err)
@@ -222,7 +222,7 @@ func readConfigBytes(content []byte) (*option.Options, error) {
return &options, nil
}
func readHiddifyOptionsAt(path string) (*config.HiddifyOptions, error) {
func ReadHiddifyOptionsAt(path string) (*config.HiddifyOptions, error) {
content, err := os.ReadFile(path)
if err != nil {
return nil, err