■ ■ ■ ■ ■ ■
pkg/protocols/http/http.go
| skipped 19 lines |
20 | 20 | | "golang.org/x/net/context" |
21 | 21 | | |
22 | 22 | | "github.com/valyala/fasthttp" |
23 | | - | "github.com/valyala/fasthttp/fasthttpproxy" |
24 | 23 | | "github.com/zan8in/afrog/pkg/log" |
25 | 24 | | "github.com/zan8in/afrog/pkg/poc" |
26 | 25 | | "github.com/zan8in/afrog/pkg/proto" |
| skipped 46 lines |
73 | 72 | | // DNSCacheDuration: time.Hour, |
74 | 73 | | // }).Dial, |
75 | 74 | | } |
76 | | - | if len(strings.TrimSpace(options.Config.ConfigHttp.Proxy)) > 0 { |
77 | | - | if strings.HasPrefix(options.Config.ConfigHttp.Proxy, "socks4://") || strings.HasPrefix(options.Config.ConfigHttp.Proxy, "socks5://") { |
78 | | - | F.Dial = fasthttpproxy.FasthttpSocksDialer(options.Config.ConfigHttp.Proxy) |
79 | | - | } else { |
80 | | - | // username:password@localhost:1082 |
81 | | - | F.Dial = fasthttpproxy.FasthttpHTTPDialer(options.Config.ConfigHttp.Proxy) |
82 | | - | } |
83 | | - | } |
| 75 | + | // if len(strings.TrimSpace(options.Config.ConfigHttp.Proxy)) > 0 { |
| 76 | + | // if strings.HasPrefix(options.Config.ConfigHttp.Proxy, "socks4://") || strings.HasPrefix(options.Config.ConfigHttp.Proxy, "socks5://") { |
| 77 | + | // F.Dial = fasthttpproxy.FasthttpSocksDialer(options.Config.ConfigHttp.Proxy) |
| 78 | + | // } else { |
| 79 | + | // // username:password@localhost:1082 |
| 80 | + | // F.Dial = fasthttpproxy.FasthttpHTTPDialer(options.Config.ConfigHttp.Proxy) |
| 81 | + | // } |
| 82 | + | // } |
84 | 83 | | } |
85 | 84 | | |
86 | 85 | | func (fc *FastClient) HTTPRequest(ctx context.Context, httpRequest *http.Request, rule poc.Rule, variableMap map[string]any) error { |
| skipped 946 lines |