mirror of
https://github.com/apernet/hysteria.git
synced 2025-04-04 21:17:47 +03:00
Have to use Dial (not DialContext) to make goproxy happy
This commit is contained in:
parent
d3ad171761
commit
c456079be1
1 changed files with 1 additions and 2 deletions
|
@ -1,7 +1,6 @@
|
||||||
package http
|
package http
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
|
@ -22,7 +21,7 @@ func NewProxyHTTPServer(hyClient core.Client, idleTimeout time.Duration, aclEngi
|
||||||
proxy.Logger = &nopLogger{}
|
proxy.Logger = &nopLogger{}
|
||||||
proxy.NonproxyHandler = http.NotFoundHandler()
|
proxy.NonproxyHandler = http.NotFoundHandler()
|
||||||
proxy.Tr = &http.Transport{
|
proxy.Tr = &http.Transport{
|
||||||
DialContext: func(ctx context.Context, network, addr string) (net.Conn, error) {
|
Dial: func(network, addr string) (net.Conn, error) {
|
||||||
// Parse addr string
|
// Parse addr string
|
||||||
host, port, err := net.SplitHostPort(addr)
|
host, port, err := net.SplitHostPort(addr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue