fix: Merge remote-tracking branch 'upstream/main'
This commit is contained in:
commit
8f03b2def3
2 files changed
+11
-3
No files matched your search
@@ -20,6 +20,8 @@
|
|||||||
- https://github.com/WINGS-N/WINGSV - клиент для андроида с One UI, WireGuard, раздачей VPN с root
|
- https://github.com/WINGS-N/WINGSV - клиент для андроида с One UI, WireGuard, раздачей VPN с root
|
||||||
- https://github.com/kiper292/wireguard-turn-android - клиент для андроида интегрированный в WireGuard
|
- https://github.com/kiper292/wireguard-turn-android - клиент для андроида интегрированный в WireGuard
|
||||||
- https://github.com/oxsidee/vkpn - клиент для андроида (кроссплатформенный Flutter)
|
- https://github.com/oxsidee/vkpn - клиент для андроида (кроссплатформенный Flutter)
|
||||||
|
- https://github.com/antongospod/turn-proxy-android - клиент для андроида c Material 3 UI и автоапдейтами (Kotlin)
|
||||||
|
- https://github.com/amurcanov/proxy-turn-vk-android - клиент для андроида с WireGuard
|
||||||
|
|
||||||
#### iOS
|
#### iOS
|
||||||
- https://github.com/nullcstring/turnbridge - клиент для iOS
|
- https://github.com/nullcstring/turnbridge - клиент для iOS
|
||||||
|
|||||||
+9
-3
@@ -67,6 +67,7 @@ var (
|
|||||||
globalAppCancel context.CancelFunc
|
globalAppCancel context.CancelFunc
|
||||||
handshakeSem = make(chan struct{}, 3)
|
handshakeSem = make(chan struct{}, 3)
|
||||||
isDebug bool
|
isDebug bool
|
||||||
|
manualCaptcha bool
|
||||||
)
|
)
|
||||||
|
|
||||||
type UDPPacket struct {
|
type UDPPacket struct {
|
||||||
@@ -864,7 +865,10 @@ func getTokenChain(ctx context.Context, link string, streamID int, creds VKCrede
|
|||||||
urlAddr := fmt.Sprintf("https://api.vk.ru/method/calls.getAnonymousToken?v=5.275&client_id=%s", creds.ClientID)
|
urlAddr := fmt.Sprintf("https://api.vk.ru/method/calls.getAnonymousToken?v=5.275&client_id=%s", creds.ClientID)
|
||||||
|
|
||||||
var token2 string
|
var token2 string
|
||||||
const maxAutoAttempts = 2
|
maxAutoAttempts := 2
|
||||||
|
if manualCaptcha {
|
||||||
|
maxAutoAttempts = 0
|
||||||
|
}
|
||||||
for attempt := 0; attempt <= maxAutoAttempts+1; attempt++ {
|
for attempt := 0; attempt <= maxAutoAttempts+1; attempt++ {
|
||||||
resp, err = doRequest(data, urlAddr)
|
resp, err = doRequest(data, urlAddr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -940,11 +944,11 @@ func getTokenChain(ctx context.Context, link string, streamID int, creds VKCrede
|
|||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
} else if attempt == maxAutoAttempts-1 {
|
} else if attempt == maxAutoAttempts-1 {
|
||||||
log.Printf("[STREAM %d] [Captcha] Backing off for 30 seconds before manual fallback...", streamID)
|
log.Printf("[STREAM %d] [Captcha] Backing off for 2 seconds before manual fallback...", streamID)
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return "", "", "", ctx.Err()
|
return "", "", "", ctx.Err()
|
||||||
case <-time.After(30 * time.Second):
|
case <-time.After(2 * time.Second):
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -1759,6 +1763,7 @@ func main() {
|
|||||||
direct := flag.Bool("no-dtls", false, "connect without obfuscation. DO NOT USE")
|
direct := flag.Bool("no-dtls", false, "connect without obfuscation. DO NOT USE")
|
||||||
vlessMode := flag.Bool("vless", false, "VLESS mode: forward TCP connections (for VLESS) instead of UDP packets")
|
vlessMode := flag.Bool("vless", false, "VLESS mode: forward TCP connections (for VLESS) instead of UDP packets")
|
||||||
debugFlag := flag.Bool("debug", false, "enable debug logging")
|
debugFlag := flag.Bool("debug", false, "enable debug logging")
|
||||||
|
manualCaptchaFlag := flag.Bool("manual-captcha", false, "skip auto captcha solving, use manual mode immediately")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
if *peerAddr == "" {
|
if *peerAddr == "" {
|
||||||
log.Panicf("Need peer address!")
|
log.Panicf("Need peer address!")
|
||||||
@@ -1772,6 +1777,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
isDebug = *debugFlag
|
isDebug = *debugFlag
|
||||||
|
manualCaptcha = *manualCaptchaFlag
|
||||||
|
|
||||||
var link string
|
var link string
|
||||||
var getCreds getCredsFunc
|
var getCreds getCredsFunc
|
||||||
|
|||||||
Reference in new issue
Block a user