Skip to content

Commit fc7f6b6

Browse files
committed
feat: cleanup
Signed-off-by: QuentinN42 <quentin@lieumont.fr>
1 parent 6e3e991 commit fc7f6b6

File tree

3 files changed

+2
-16
lines changed

3 files changed

+2
-16
lines changed

.dockerignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

Dockerfile

Lines changed: 0 additions & 6 deletions
This file was deleted.

pkg/locations/private/proxydial.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@ import (
44
"context"
55
"net"
66
"net/url"
7-
"time"
87
)
98

10-
11-
129
func proxyDialer(proxy string) func(context.Context, string) (net.Conn, error) {
1310
return func(ctx context.Context, addr string) (net.Conn, error) {
1411
proxyURL, err := url.Parse(proxy)
@@ -23,16 +20,13 @@ func proxyDialer(proxy string) func(context.Context, string) (net.Conn, error) {
2320
}
2421
return doHTTPConnectHandshake(ctx, conn, addr, *proxyURL)
2522
}
26-
}
23+
}
2724

2825
func getConn(ctx context.Context, target, proxyURL string) (net.Conn, error) {
29-
ctx, cancel := context.WithTimeout(ctx, time.Second)
30-
defer cancel()
31-
3226
if proxyURL == "" {
3327
return netDialerWithTCPKeepalive().DialContext(ctx, "tcp", target)
3428
}
3529

3630
dialer := proxyDialer(proxyURL)
3731
return dialer(ctx, target)
38-
}
32+
}

0 commit comments

Comments
 (0)