@@ -78,7 +78,7 @@ func readAndBuildConfig(ctx context.Context, hiddifySettingPath string, configPa
7878 }
7979
8080 result .HiddifyHiddifyOptions = hiddifyconfig
81- result .Config , err = buildStandaloneConfig (ctx , & config.ReadOptions {Path : configPath }, result .HiddifyHiddifyOptions )
81+ result .Config , err = buildStandaloneConfig (ctx , & config.ReadOptions {Content : result . Config }, result .HiddifyHiddifyOptions )
8282 if err != nil {
8383 return result , err
8484 }
@@ -99,7 +99,7 @@ func readConfigContent(configPath string) (ConfigResult, error) {
9999 fmt .Println ("Error creating request:" , err )
100100 return ConfigResult {}, err
101101 }
102- req .Header .Set ("User-Agent" , "HiddifyNext/2.3.1 (" + runtime .GOOS + ") like ClashMeta v2ray sing-box" )
102+ req .Header .Set ("User-Agent" , "HiddifyNext/4.0.0 (" + runtime .GOOS + ") like ClashMeta v2ray sing-box" )
103103 resp , err := client .Do (req )
104104 if err != nil {
105105 fmt .Println ("Error making GET request:" , err )
@@ -114,6 +114,7 @@ func readConfigContent(configPath string) (ConfigResult, error) {
114114 content = string (body )
115115 refreshInterval , _ = extractRefreshInterval (resp .Header , content )
116116 fmt .Printf ("Refresh interval: %d\n " , refreshInterval )
117+
117118 } else {
118119 data , err := ioutil .ReadFile (configPath )
119120 if err != nil {
0 commit comments