diff --git a/android-app/app/libs/mobile.aar b/android-app/app/libs/mobile.aar index 0c0568b..128c7b0 100644 Binary files a/android-app/app/libs/mobile.aar and b/android-app/app/libs/mobile.aar differ diff --git a/android-app/app/src/main/assets/autoclick-vk.js b/android-app/app/src/main/assets/autoclick-vk.js index 8e009a3..f224ba4 100644 --- a/android-app/app/src/main/assets/autoclick-vk.js +++ b/android-app/app/src/main/assets/autoclick-vk.js @@ -44,7 +44,7 @@ function scanForCaptcha() { var iframes = document.querySelectorAll("iframe"); for (var i = 0; i < iframes.length; i++) { - if (iframes[i].src.startsWith("https://id.vk.com/not_robot_captcha")) { + if (iframes[i].src.startsWith("https://id.vk.ru/not_robot_captcha")) { if(!wasCaptchaDetected) { log('Captcha detected, user action required'); AndroidBridge.onCaptchaDetected(false); diff --git a/android-app/app/src/main/jniLibs/arm64-v8a/librelay.so b/android-app/app/src/main/jniLibs/arm64-v8a/librelay.so index a7651cb..d60f9e6 100755 Binary files a/android-app/app/src/main/jniLibs/arm64-v8a/librelay.so and b/android-app/app/src/main/jniLibs/arm64-v8a/librelay.so differ diff --git a/android-app/app/src/main/jniLibs/armeabi-v7a/librelay.so b/android-app/app/src/main/jniLibs/armeabi-v7a/librelay.so index b214d5c..6c23bb2 100755 Binary files a/android-app/app/src/main/jniLibs/armeabi-v7a/librelay.so and b/android-app/app/src/main/jniLibs/armeabi-v7a/librelay.so differ diff --git a/creator-app/scripts/vk-call-creator.js b/creator-app/scripts/vk-call-creator.js index 9b05061..9a769d3 100644 --- a/creator-app/scripts/vk-call-creator.js +++ b/creator-app/scripts/vk-call-creator.js @@ -5,7 +5,7 @@ var CALL_MENU_TRIGGER_ID = 'call-menu-trigger'; var CALL_MENU_ID = 'call-menu'; var CALL_IN_PROGRESS_KEY = 'call_in_progress'; - var VK_CALL_BASE = 'https://vk.com/call/join/'; + var VK_CALL_BASE = 'https://vk.ru/call/join/'; var start = function() { console.log("[BOT] VKCalls: DOM ready..."); @@ -67,7 +67,7 @@ var inputs = document.querySelectorAll('input[readonly], input[type="text"]'); for (var i = 0; i < inputs.length; i++) { var val = inputs[i].value || ''; - if (val.indexOf('vk.com/call/join/') !== -1) { + if (val.indexOf('vk.ru/call/join/') !== -1) { captureLink(val); clearInterval(pollLink); return; diff --git a/creator-app/src/bot/bot-manager.ts b/creator-app/src/bot/bot-manager.ts index bdfc6d6..2a55550 100644 --- a/creator-app/src/bot/bot-manager.ts +++ b/creator-app/src/bot/bot-manager.ts @@ -219,7 +219,7 @@ export class BotManager { if (lower.startsWith('dion://') || lower.includes('dion.vc')) { return { platform: Platform.Dion, target: trimmed }; } - if (lower.includes('vk.com/call/join')) { + if (lower.includes('vk.ru/call/join')) { return { platform: Platform.VK, target: trimmed }; } return null; diff --git a/creator-app/src/constants.ts b/creator-app/src/constants.ts index 3b9d13a..69b3e87 100644 --- a/creator-app/src/constants.ts +++ b/creator-app/src/constants.ts @@ -9,12 +9,12 @@ export const BOT_POLL_RETRY_DELAY_MS = 1000; export const BOT_POLL_WAIT_SECONDS = 25; export const VK_API_VERSION = '5.131'; -export const VK_API_BASE_URL = 'https://api.vk.com/method'; -export const VK_IM_URL = 'https://vk.com/im'; +export const VK_API_BASE_URL = 'https://api.vk.ru/method'; +export const VK_IM_URL = 'https://vk.ru/im'; export const TELEMOST_URL = 'https://telemost.yandex.ru/'; export const DION_URL = 'https://dion.vc/'; -export const VK_LOGIN_URL = 'https://vk.com/'; +export const VK_LOGIN_URL = 'https://vk.ru/'; export const YANDEX_LOGIN_URL = 'https://passport.yandex.ru/auth?retpath=https%3A%2F%2Ftelemost.yandex.ru%2F'; export const DION_LOGIN_URL = 'https://dion.vc/login'; export const WBSTREAM_LOGIN_URL = 'https://stream.wb.ru/login'; @@ -31,7 +31,7 @@ export const USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ' + 'AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36'; -export const VK_COOKIE_DOMAINS = ['vk.com', 'vk.ru']; +export const VK_COOKIE_DOMAINS = ['vk.ru']; export const YANDEX_COOKIE_DOMAINS = ['yandex.ru', 'yandex.net', 'ya.ru']; export const DION_COOKIE_DOMAINS = ['dion.vc']; export const WBSTREAM_COOKIE_DOMAINS = ['stream.wb.ru', 'wb.ru', 'wildberries.ru']; diff --git a/creator-app/src/main/window.ts b/creator-app/src/main/window.ts index 8768425..73b7376 100644 --- a/creator-app/src/main/window.ts +++ b/creator-app/src/main/window.ts @@ -91,7 +91,7 @@ export function createWindow(tabManager: TabManager): BrowserWindow { if (url.includes('telemost.yandex')) { ac.vk.stop(); ac.telemost.attach(wvContents); - } else if (url.includes('vk.com')) { + } else if (url.includes('vk.ru')) { ac.telemost.stop(); ac.vk.attach(wvContents); } else { diff --git a/creator-app/src/renderer/dom.ts b/creator-app/src/renderer/dom.ts index 10d65c5..8e372f9 100644 --- a/creator-app/src/renderer/dom.ts +++ b/creator-app/src/renderer/dom.ts @@ -79,7 +79,7 @@ export function renderContent(tm: RendererTabManager): void { targetInput.placeholder = 'https://telemost.yandex.ru/j/...'; } else { targetLabel.textContent = 'Paste a VK call link.'; - targetInput.placeholder = 'https://vk.com/call/join/...'; + targetInput.placeholder = 'https://vk.ru/call/join/...'; } } else { startEl.classList.remove('visible'); @@ -116,7 +116,7 @@ export function renderContent(tm: RendererTabManager): void { } else { toolbar.style.display = 'flex'; headlessInfo.style.display = 'none'; - const isVK = activeTab.platform === Platform.VK && activeTab.url.includes('vk.com'); + const isVK = activeTab.platform === Platform.VK && activeTab.url.includes('vk.ru'); const modeSelect = document.getElementById('modeSelect') as HTMLSelectElement; const tunnelLabel = document.getElementById('tunnelLabel') as HTMLElement; modeSelect.style.display = isVK ? '' : 'none'; @@ -172,7 +172,7 @@ export function loadURL(tm: RendererTabManager, url: string): void { if (url.includes('telemost.yandex')) { activeTab.platform = Platform.Telemost; activeTab.mode = TunnelMode.PionVideo; - } else if (url.includes('vk.com')) { + } else if (url.includes('vk.ru')) { activeTab.platform = Platform.VK; } window.bridge.setTunnelMode(tm.activeTabId, activeTab.mode, activeTab.platform); diff --git a/creator-app/src/renderer/tab-manager.ts b/creator-app/src/renderer/tab-manager.ts index e3ff407..20947a4 100644 --- a/creator-app/src/renderer/tab-manager.ts +++ b/creator-app/src/renderer/tab-manager.ts @@ -165,7 +165,7 @@ export class RendererTabManager { getTabLabel(tab: RendererTab): string { if (tab.name) return tab.name; if (tab.url) { - if (tab.url.includes('vk.com')) return 'VK (legacy)'; + if (tab.url.includes('vk.ru')) return 'VK (legacy)'; if (tab.url.includes('telemost')) return 'Telemost (legacy)'; if (tab.url.includes('dion.vc')) return 'DION'; } diff --git a/headless/vk-bot/main.go b/headless/vk-bot/main.go index b158935..61bc3a4 100644 --- a/headless/vk-bot/main.go +++ b/headless/vk-bot/main.go @@ -21,7 +21,7 @@ import ( ) const ( - vkAPIBase = "https://api.vk.com/method" + vkAPIBase = "https://api.vk.ru/method" vkAPIVersion = "5.199" pollWait = 25 retryDelay = 3 * time.Second @@ -272,7 +272,7 @@ func detectJoinLink(text string) (platform, target string, ok bool) { return "tm", trimmed, true case strings.HasPrefix(lower, "dion://"), strings.Contains(lower, "dion.vc"): return "dion", trimmed, true - case strings.Contains(lower, "vk.com/call/join"): + case strings.Contains(lower, "vk.ru/call/join"): return "vk", trimmed, true } return "", "", false diff --git a/headless/vk/main.go b/headless/vk/main.go index 8c875be..45cb9e6 100644 --- a/headless/vk/main.go +++ b/headless/vk/main.go @@ -103,8 +103,8 @@ func httpPost(endpoint string, form url.Values, extraHeaders map[string]string) } req.Header.Set("Content-Type", "application/x-www-form-urlencoded") req.Header.Set("User-Agent", common.UserAgent) - req.Header.Set("Origin", "https://vk.com") - req.Header.Set("Referer", "https://vk.com/") + req.Header.Set("Origin", "https://vk.ru") + req.Header.Set("Referer", "https://vk.ru/") for k, v := range extraHeaders { req.Header.Set(k, v) } @@ -138,7 +138,7 @@ func authAndJoin(cookieStr, okJoinLink string, cfg VKConfig) (*JoinResponse, err return map[string]string{"Authorization": "Bearer " + bearer} } - r, err := httpPost("https://login.vk.com/?act=web_token", + r, err := httpPost("https://login.vk.ru/?act=web_token", url.Values{"version": {"1"}, "app_id": {cfg.AppID}}, map[string]string{"Cookie": cookieStr}) if err != nil { @@ -150,7 +150,7 @@ func authAndJoin(cookieStr, okJoinLink string, cfg VKConfig) (*JoinResponse, err return nil, fmt.Errorf("empty VK token, response: %s", string(r)) } - r, err = httpPost("https://api.vk.com/method/calls.getSettings", + r, err = httpPost("https://api.vk.ru/method/calls.getSettings", url.Values{"v": {cfg.APIVersion}}, auth(tok.Data.AccessToken)) if err != nil { return nil, fmt.Errorf("calls.getSettings: %w", err) @@ -162,7 +162,7 @@ func authAndJoin(cookieStr, okJoinLink string, cfg VKConfig) (*JoinResponse, err return nil, fmt.Errorf("empty public_key, response: %s", string(r)) } - r, err = httpPost("https://api.vk.com/method/messages.getCallToken", + r, err = httpPost("https://api.vk.ru/method/messages.getCallToken", url.Values{"v": {cfg.APIVersion}, "env": {"production"}}, auth(tok.Data.AccessToken)) if err != nil { return nil, fmt.Errorf("messages.getCallToken: %w", err) @@ -268,7 +268,7 @@ func createAndJoinCall(cookieStr, peerId string, cfg VKConfig) (*CallInfo, error } log.Println("[auth] Getting VK token...") - r, err := httpPost("https://login.vk.com/?act=web_token", + r, err := httpPost("https://login.vk.ru/?act=web_token", url.Values{"version": {"1"}, "app_id": {cfg.AppID}}, map[string]string{"Cookie": cookieStr}) if err != nil { @@ -282,7 +282,7 @@ func createAndJoinCall(cookieStr, peerId string, cfg VKConfig) (*CallInfo, error } log.Printf("[auth] Creating call peer_id=%s...", peerId) - r, err = httpPost("https://api.vk.com/method/calls.start", + r, err = httpPost("https://api.vk.ru/method/calls.start", url.Values{"v": {cfg.APIVersion}, "peer_id": {peerId}}, auth(vkToken)) if err != nil { return nil, fmt.Errorf("calls.start: %w", err) diff --git a/hooks/autoclick-vk.js b/hooks/autoclick-vk.js index 8e009a3..f224ba4 100644 --- a/hooks/autoclick-vk.js +++ b/hooks/autoclick-vk.js @@ -44,7 +44,7 @@ function scanForCaptcha() { var iframes = document.querySelectorAll("iframe"); for (var i = 0; i < iframes.length; i++) { - if (iframes[i].src.startsWith("https://id.vk.com/not_robot_captcha")) { + if (iframes[i].src.startsWith("https://id.vk.ru/not_robot_captcha")) { if(!wasCaptchaDetected) { log('Captcha detected, user action required'); AndroidBridge.onCaptchaDetected(false); diff --git a/joiner-desktop-app/desktop-joiner/main.go b/joiner-desktop-app/desktop-joiner/main.go index d8c6102..450f049 100644 --- a/joiner-desktop-app/desktop-joiner/main.go +++ b/joiner-desktop-app/desktop-joiner/main.go @@ -330,7 +330,7 @@ func signalingHosts(platform, link string) []string { } return hosts case "vk": - hosts := []string{"vk.com", "login.vk.com", "api.vk.com", "ok.ru", "cloud-api.yandex.ru"} + hosts := []string{"vk.ru", "login.vk.ru", "api.vk.ru", "ok.ru", "cloud-api.yandex.ru"} if u, err := url.Parse(strings.TrimSpace(link)); err == nil && u.Host != "" { hosts = append(hosts, u.Host) } diff --git a/relay/pion/headless-joiner-common/vk_auth.go b/relay/pion/headless-joiner-common/vk_auth.go index 43a8d3d..d4d7076 100644 --- a/relay/pion/headless-joiner-common/vk_auth.go +++ b/relay/pion/headless-joiner-common/vk_auth.go @@ -51,8 +51,8 @@ func RunVKAuth(joinLink string, displayName string, logFn func(string, ...any), req, _ := http.NewRequest("POST", targetURL, strings.NewReader(form.Encode())) req.Header.Set("Content-Type", "application/x-www-form-urlencoded") req.Header.Set("User-Agent", common.UserAgent) - req.Header.Set("Origin", "https://vk.com") - req.Header.Set("Referer", "https://vk.com/") + req.Header.Set("Origin", "https://vk.ru") + req.Header.Set("Referer", "https://vk.ru/") for k, v := range extraHeaders { req.Header.Set(k, v) } @@ -84,7 +84,7 @@ func RunVKAuth(joinLink string, displayName string, logFn func(string, ...any), statusFn("Getting anonymous token...") logFn("vk-auth: getting anon token") - anonResp, err := httpPost("https://login.vk.com/?act=get_anonym_token", url.Values{ + anonResp, err := httpPost("https://login.vk.ru/?act=get_anonym_token", url.Values{ "client_id": {cfg.AppID}, }, nil) if err != nil { @@ -102,7 +102,7 @@ func RunVKAuth(joinLink string, displayName string, logFn func(string, ...any), statusFn("Getting call settings...") logFn("vk-auth: getting call settings") - settingsResp, err := httpPost("https://api.vk.com/method/calls.getSettings", url.Values{ + settingsResp, err := httpPost("https://api.vk.ru/method/calls.getSettings", url.Values{ "v": {cfg.ApiVersion}, }, auth) if err != nil { @@ -121,7 +121,7 @@ func RunVKAuth(joinLink string, displayName string, logFn func(string, ...any), statusFn("Getting call preview...") logFn("vk-auth: getting call preview") - previewResp, err := httpPost("https://api.vk.com/method/calls.getCallPreview", url.Values{ + previewResp, err := httpPost("https://api.vk.ru/method/calls.getCallPreview", url.Values{ "v": {cfg.ApiVersion}, "vk_join_link": {joinLink}, }, auth) @@ -149,7 +149,7 @@ func RunVKAuth(joinLink string, displayName string, logFn func(string, ...any), var okJoinLink string for attempt := 0; attempt < 5; attempt++ { - callResp, err := httpPost("https://api.vk.com/method/calls.getAnonymousToken", callParams, auth) + callResp, err := httpPost("https://api.vk.ru/method/calls.getAnonymousToken", callParams, auth) if err != nil { return "", fmt.Errorf("getAnonymousToken: %w", err) } diff --git a/relay/pion/headless-joiner-common/vk_joiner.go b/relay/pion/headless-joiner-common/vk_joiner.go index f1f7f0b..cdd5a01 100644 --- a/relay/pion/headless-joiner-common/vk_joiner.go +++ b/relay/pion/headless-joiner-common/vk_joiner.go @@ -138,7 +138,7 @@ func (h *VKHeadlessJoiner) RunWithParams(jsonParams string) { h.obf = obf h.vp8FPS = params.VP8FPS h.vp8Batch = params.VP8Batch - h.dualTrack = params.DualTrack + // h.dualTrack = params.DualTrack // temporarily disabled for VK joiners h.logFn("headless: auth params received") h.logFn("headless: obf key-source=%q localEpoch=0x%08x", params.JoinLink, obf.LocalEpoch()) h.logFn("headless: appVersion=%s protocolVersion=%s vp8Fps=%d vp8Batch=%d",