Resolve golangci and gofmt issues
This commit is contained in:
1 parent
1d2fea2040
commit
58a9b1e081
2 files changed
+11
-10
No files matched your search
+9
-10
@@ -432,7 +432,7 @@ func fetchCaptchaBootstrap(ctx context.Context, redirectURI string, client tlscl
|
|||||||
}
|
}
|
||||||
domain := parsedURL.Hostname()
|
domain := parsedURL.Hostname()
|
||||||
|
|
||||||
req, err := fhttp.NewRequestWithContext(ctx, "GET", RedirectURI, nil)
|
req, err := fhttp.NewRequestWithContext(ctx, "GET", redirectURI, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -936,7 +936,7 @@ func getTokenChain(ctx context.Context, link string, streamID int, creds VKCrede
|
|||||||
solveErr = fmt.Errorf("missing fields for auto solve")
|
solveErr = fmt.Errorf("missing fields for auto solve")
|
||||||
}
|
}
|
||||||
case captchaSolveModeSliderPOC:
|
case captchaSolveModeSliderPOC:
|
||||||
if captchaErr.SessionToken != "" && captchaErr.RedirectUri != "" {
|
if captchaErr.SessionToken != "" && captchaErr.RedirectURI != "" {
|
||||||
successToken, solveErr = solveVkCaptcha(ctx, captchaErr, streamID, client, profile, true)
|
successToken, solveErr = solveVkCaptcha(ctx, captchaErr, streamID, client, profile, true)
|
||||||
if solveErr != nil {
|
if solveErr != nil {
|
||||||
log.Printf("[STREAM %d] [Captcha] Auto captcha slider POC failed: %v", streamID, solveErr)
|
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
|
|||||||
return nil, nil, fmt.Errorf("generate cert: %w", err)
|
return nil, nil, fmt.Errorf("generate cert: %w", err)
|
||||||
}
|
}
|
||||||
dtlsPC := &relayPacketConn{relay: relayConn, peer: peer}
|
dtlsPC := &relayPacketConn{relay: relayConn, peer: peer}
|
||||||
dtlsConfig := &dtls.Config{
|
dtlsConn, err := dtls.ClientWithOptions(dtlsPC, peer,
|
||||||
Certificates: []tls.Certificate{certificate},
|
dtls.WithCertificates(certificate),
|
||||||
InsecureSkipVerify: true,
|
dtls.WithInsecureSkipVerify(true),
|
||||||
ExtendedMasterSecret: dtls.RequireExtendedMasterSecret,
|
dtls.WithExtendedMasterSecret(dtls.RequireExtendedMasterSecret),
|
||||||
CipherSuites: []dtls.CipherSuiteID{dtls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256},
|
dtls.WithCipherSuites(dtls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256),
|
||||||
ConnectionIDGenerator: dtls.OnlySendCIDGenerator(),
|
dtls.WithConnectionIDGenerator(dtls.OnlySendCIDGenerator()),
|
||||||
}
|
)
|
||||||
dtlsConn, err := dtls.Client(dtlsPC, peer, dtlsConfig)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
cleanup()
|
cleanup()
|
||||||
return nil, nil, fmt.Errorf("DTLS client create: %w", err)
|
return nil, nil, fmt.Errorf("DTLS client create: %w", err)
|
||||||
|
|||||||
@@ -46,4 +46,6 @@ require (
|
|||||||
golang.org/x/sys v0.43.0 // indirect
|
golang.org/x/sys v0.43.0 // indirect
|
||||||
golang.org/x/text v0.35.0 // indirect
|
golang.org/x/text v0.35.0 // indirect
|
||||||
golang.org/x/tools v0.43.0 // indirect
|
golang.org/x/tools v0.43.0 // indirect
|
||||||
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d // indirect
|
||||||
|
google.golang.org/grpc v1.80.0 // indirect
|
||||||
)
|
)
|
||||||
Reference in new issue
Block a user