Skip to content

Commit 58a9b1e

Browse files
committed
Resolve golangci and gofmt issues
1 parent 1d2fea2 commit 58a9b1e

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

client/main.go

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ func fetchCaptchaBootstrap(ctx context.Context, redirectURI string, client tlscl
432432
}
433433
domain := parsedURL.Hostname()
434434

435-
req, err := fhttp.NewRequestWithContext(ctx, "GET", RedirectURI, nil)
435+
req, err := fhttp.NewRequestWithContext(ctx, "GET", redirectURI, nil)
436436
if err != nil {
437437
return nil, err
438438
}
@@ -936,7 +936,7 @@ func getTokenChain(ctx context.Context, link string, streamID int, creds VKCrede
936936
solveErr = fmt.Errorf("missing fields for auto solve")
937937
}
938938
case captchaSolveModeSliderPOC:
939-
if captchaErr.SessionToken != "" && captchaErr.RedirectUri != "" {
939+
if captchaErr.SessionToken != "" && captchaErr.RedirectURI != "" {
940940
successToken, solveErr = solveVkCaptcha(ctx, captchaErr, streamID, client, profile, true)
941941
if solveErr != nil {
942942
log.Printf("[STREAM %d] [Captcha] Auto captcha slider POC failed: %v", streamID, solveErr)
@@ -2215,14 +2215,13 @@ func createSmuxSession(ctx context.Context, tp *turnParams, peer *net.UDPAddr, i
22152215
return nil, nil, fmt.Errorf("generate cert: %w", err)
22162216
}
22172217
dtlsPC := &relayPacketConn{relay: relayConn, peer: peer}
2218-
dtlsConfig := &dtls.Config{
2219-
Certificates: []tls.Certificate{certificate},
2220-
InsecureSkipVerify: true,
2221-
ExtendedMasterSecret: dtls.RequireExtendedMasterSecret,
2222-
CipherSuites: []dtls.CipherSuiteID{dtls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256},
2223-
ConnectionIDGenerator: dtls.OnlySendCIDGenerator(),
2224-
}
2225-
dtlsConn, err := dtls.Client(dtlsPC, peer, dtlsConfig)
2218+
dtlsConn, err := dtls.ClientWithOptions(dtlsPC, peer,
2219+
dtls.WithCertificates(certificate),
2220+
dtls.WithInsecureSkipVerify(true),
2221+
dtls.WithExtendedMasterSecret(dtls.RequireExtendedMasterSecret),
2222+
dtls.WithCipherSuites(dtls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256),
2223+
dtls.WithConnectionIDGenerator(dtls.OnlySendCIDGenerator()),
2224+
)
22262225
if err != nil {
22272226
cleanup()
22282227
return nil, nil, fmt.Errorf("DTLS client create: %w", err)

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,6 @@ require (
4646
golang.org/x/sys v0.43.0 // indirect
4747
golang.org/x/text v0.35.0 // indirect
4848
golang.org/x/tools v0.43.0 // indirect
49+
google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d // indirect
50+
google.golang.org/grpc v1.80.0 // indirect
4951
)

0 commit comments

Comments
 (0)