Skip to content

Commit

Permalink
fix: direct and bypass showing
Browse files Browse the repository at this point in the history
  • Loading branch information
x committed Dec 30, 2024
1 parent a22b99a commit 648d9d8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion v2/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func setOutbounds(options *option.Options, input *option.Options, opt *HiddifyOp
if opt.Warp.EnableWarp && opt.Warp.Mode == "warp_over_proxy" && out.Tag == "Hiddify Warp ✅" {
continue
}
if !strings.Contains(out.Tag, "§hide§") {
if !strings.Contains(out.Tag, "§hide§") && !contains([]string{"direct", "bypass", "block"}, out.Tag) {
tags = append(tags, out.Tag)
}
out = patchHiddifyWarpFromConfig(out, *opt)
Expand Down Expand Up @@ -243,6 +243,15 @@ func isBlockedConnectionTestUrl(d string) bool {
return isBlockedDomain(u.Host)
}

func contains(slice []string, item string) bool {
for _, s := range slice {
if s == item {
return true
}
}
return false
}

func setClashAPI(options *option.Options, opt *HiddifyOptions) {
if opt.EnableClashApi {
if opt.ClashApiSecret == "" {
Expand Down

0 comments on commit 648d9d8

Please sign in to comment.