migrate to vk.ru, temporarily disable dual vp8 for vk

This commit is contained in:
kulikov0 committed 2026-07-24 15:19:55 +02:00
1 parent f4714f93d6
commit e6502a4ac4
16 files changed
+31 -31

No files matched your search

Binary file not shown.
@@ -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);
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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;
+4 -4
View File
@@ -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'];
+1 -1
View File
@@ -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 {
+3 -3
View File
@@ -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);
+1 -1
View File
@@ -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';
}
+2 -2
View File
@@ -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
+7 -7
View File
@@ -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)
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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)
}
+6 -6
View File
@@ -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)
}
@@ -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",