new: Big Change, Add support for Extensions 😍
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user