From b16db743c01139d456c28b4452077bf3d9739414 Mon Sep 17 00:00:00 2001 From: antongospod <47962758+antongospod@users.noreply.github.com> Date: Thu, 9 Apr 2026 19:00:41 +0300 Subject: [PATCH 1/2] fix(129): manual captcha solving UNAUTHORIZED_RESTRICTION --- client/main.go | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/client/main.go b/client/main.go index 6186914..511a3bf 100644 --- a/client/main.go +++ b/client/main.go @@ -908,11 +908,6 @@ func getTokenChain(ctx context.Context, link string, streamID int, creds VKCrede var token2 string for attempt := 0; ; attempt++ { - solveMode, hasSolveMode := captchaSolveModeForAttempt(attempt, manualCaptcha, autoCaptchaSliderPOC) - if !hasSolveMode { - break - } - resp, err = doRequest(data, urlAddr) if err != nil { return "", "", "", err @@ -921,6 +916,21 @@ func getTokenChain(ctx context.Context, link string, streamID int, creds VKCrede if errObj, hasErr := resp["error"].(map[string]interface{}); hasErr { captchaErr := ParseVkCaptchaError(errObj) if captchaErr != nil && captchaErr.IsCaptchaError() { + solveMode, hasSolveMode := captchaSolveModeForAttempt(attempt, manualCaptcha, autoCaptchaSliderPOC) + if !hasSolveMode { + log.Printf("[STREAM %d] [Captcha] No more solve modes available (attempt %d)", streamID, attempt+1) + + // Engage global lockout to protect API + globalCaptchaLockout.Store(time.Now().Add(60 * time.Second).Unix()) + + if connectedStreams.Load() == 0 { + log.Printf("[STREAM %d] [FATAL] 0 connected streams and captcha solve modes exhausted.", streamID) + return "", "", "", fmt.Errorf("FATAL_CAPTCHA_FAILED_NO_STREAMS") + } + + return "", "", "", fmt.Errorf("CAPTCHA_WAIT_REQUIRED") + } + var successToken string var captchaKey string var solveErr error From 729443fd8413a10e7483ac82574220c3a31da300 Mon Sep 17 00:00:00 2001 From: antongospod <47962758+antongospod@users.noreply.github.com> Date: Fri, 10 Apr 2026 01:58:14 +0300 Subject: [PATCH 2/2] =?UTF-8?q?fix(#129):=20vless-=D1=80=D0=B5=D0=B6=D0=B8?= =?UTF-8?q?=D0=BC=20=D0=BF=D0=B0=D0=B4=D0=B0=D0=BB=20=D0=BD=D0=B0=20Androi?= =?UTF-8?q?d=20=D0=B8=D0=B7-=D0=B7=D0=B0=20netlinkrib=20permission=20denie?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/client/main.go b/client/main.go index 511a3bf..21e81a4 100644 --- a/client/main.go +++ b/client/main.go @@ -2195,6 +2195,7 @@ func createSmuxSession(ctx context.Context, tp *turnParams, peer *net.UDPAddr, i STUNServerAddr: turnServerAddr, TURNServerAddr: turnServerAddr, Conn: turnConn, + Net: newDirectNet(), Username: user, Password: pass, RequestedAddressFamily: addrFamily,