Skip to content
This repository was archived by the owner on Sep 27, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<a href="https://t.me/s/vtosters">
<img src="https://img.shields.io/badge/-Telegram-blue?style=for-the-badge&logo=telegram&color=2AABEE"/>
</a>
<a href="https://vk.com/vtosters_official">
<a href="https://vk.ru/vtosters_official">
<img src="https://img.shields.io/badge/-VK-blue?style=for-the-badge&logo=vk&color=0077FF"/>
</a>
<a href="https://discord.gg/j9CAt3uYXj">
Expand Down Expand Up @@ -72,7 +72,7 @@

`android:debuggable="false"` ➝ `android:debuggable="true"`

Настройки, необходимые для **отладки** вне Android Studio, находятся по этой ссылке: [vk.com/vt/debug](https://vk.com/vt/debug)
Настройки, необходимые для **отладки** вне Android Studio, находятся по этой ссылке: [vk.ru/vt/debug](https://vk.ru/vt/debug)

* Для дополнительной отладки ответов и логов необходимо включить **[Режим разработчика]**

Expand All @@ -84,7 +84,7 @@

Сразу после нажатия на запись приложение начнет записывать **все ваши действия** по пути `/Download/VK/logs/com.vtosters.lite/`

При следующем открытии приложения оно автоматически сохранит логи и отправит вам в [**Документы** ВК](https://vk.com/docs), откуда вы можете скачать архив логов и работать с ними.
При следующем открытии приложения оно автоматически сохранит логи и отправит вам в [**Документы** ВК](https://vk.ru/docs), откуда вы можете скачать архив логов и работать с ними.

## Разработка

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/ru/vtosters/hooks/CallsHook.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static void call(Context ctx, int id) {
return;
}

var link = "https://vk.com/call?id=" + id;
var link = "https://vk.ru/call?id=" + id;
var startCall = new Intent(Intent.ACTION_VIEW, Uri.parse(link)).setPackage(vk ? "com.vkontakte.android" : "com.vk.im");
startCall.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
ctx.startActivity(startCall);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public static String getAppName(int appid) { // thanks to egormetlitsky (vk mp3
case 5955265 -> "VK Mobile";
case 6614620 -> "Laney";
case 5632485 -> "SpaceVK";
case 6287487 -> "vk.com";
case 6287487 -> "vk.ru";
case 8202606 -> "VK Me Web";
case 4542624 -> "Black VK";
case 3917910 -> "Miranda NG (bridge)";
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/java/ru/vtosters/hooks/ProxyHook.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@

public class ProxyHook {
public static String linkReplacer(String link) {
String vkapi = "api.vk.com";
String oauth = "oauth.vk.com";
String vkstatic = "static.vk.com";
String vkapi = "api.vk.ru";
String oauth = "oauth.vk.ru";
String vkstatic = "static.vk.ru";

String proxyapi = getProxyHost("proxyapi");
String proxyoauth = getProxyHost("proxyoauth");
Expand Down Expand Up @@ -84,7 +84,7 @@ public static String staticFix(String str) {
}

if (isAnyProxyEnabled() && !string.isEmpty()) {
return str.replaceAll(string, "static.vk.com");
return str.replaceAll(string, "static.vk.ru");
}

return str;
Expand All @@ -101,7 +101,7 @@ public static String getAwayPhpCom() {
return proxyapi;
}

return "m.vk.com";
return "m.vk.ru";
}

public static void hookAuth(View v) {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/ru/vtosters/hooks/VKUIHook.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private static void debugWebView(WebView webView) {
}

private static void applyVKUIStyles(WebView webView) {
if (getBoolValue("VKUI_INJ", true) && webView != null && webView.getUrl() != null && !webView.getUrl().contains("static.vk.com/memories")) {
if (getBoolValue("VKUI_INJ", true) && webView != null && webView.getUrl() != null && !webView.getUrl().contains("static.vk.ru/memories")) {
WebViewColoringUtils.load();
loadAndApplyCSS(webView);
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/ru/vtosters/hooks/WebAppHook.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ public static JSONObject getWebAppConfig() throws JSONException {
.put("app", "vkclient")
.put("app_id", ApiConfig.a)
.put("appearance", VKThemeHelper.l().a() ? "light" : "dark")
.put("api_host", ProxyHook.linkReplacer(Preference.a().getString("apiHost", "api.vk.com")));
.put("api_host", ProxyHook.linkReplacer(Preference.a().getString("apiHost", "api.vk.ru")));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static JSONObject music(JSONObject json) throws JSONException {
var catalog = json.optJSONObject("catalog");
var oldItems = catalog != null ? catalog.optJSONArray("sections") : null;
var useOldAppVer = getBoolValue("useOldAppVer", false);
var isUsersCatalog = oldItems.optJSONObject(0).optString("url").equals("https://vk.com/audios" + getUserId() + "?section=" + (useOldAppVer ? "all" : "general"));
var isUsersCatalog = oldItems.optJSONObject(0).optString("url").equals("https://vk.ru/audios" + getUserId() + "?section=" + (useOldAppVer ? "all" : "general"));
var blocks = oldItems.optJSONObject(0).optJSONArray("blocks");

if (isUsersCatalog && blocks != null) {
Expand All @@ -42,13 +42,13 @@ public static JSONObject music(JSONObject json) throws JSONException {
removeUnsupportedLayouts(blocks);

if (Preferences.getBoolValue("playlistsCatalogs", true)) {
fetchCatalogId("https://vk.com/audio?section=my_playlists", oldItems);
fetchCatalogId("https://vk.ru/audio?section=my_playlists", oldItems);

fetchCatalogId("https://vk.com/audio?section=albums", oldItems);
fetchCatalogId("https://vk.ru/audio?section=albums", oldItems);
}

if (Preferences.sendMusicMetrics() && Preferences.getBoolValue("playStatCatalog", false)) {
fetchCatalogId("https://vk.com/audio?section=recent", oldItems);
fetchCatalogId("https://vk.ru/audio?section=recent", oldItems);
}

setDefaultAudioPage(oldItems, catalog);
Expand Down Expand Up @@ -90,7 +90,7 @@ public static void catalogInjector(JSONObject json) {
var section = json.optJSONObject("section");
if (section == null) return; // early return if section is null
var useOldAppVer = getBoolValue("useOldAppVer", false);
var isUsersCatalog = section.optString("url").equals("https://vk.com/audios" + getUserId() + "?section=" + (useOldAppVer ? "all" : "general"));
var isUsersCatalog = section.optString("url").equals("https://vk.ru/audios" + getUserId() + "?section=" + (useOldAppVer ? "all" : "general"));
var blocks = section.getJSONArray("blocks");

fixDailyMix(blocks);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public static void injectIntoExistingCatalog(JSONObject catalogNode) {
}

private static boolean isFirstSectionUrlValid(JSONObject firstSection) throws JSONException {
return firstSection.getString("url").equals("https://vk.com/audios" + AccountManagerUtils.getUserId() + "?section=all");
return firstSection.getString("url").equals("https://vk.ru/audios" + AccountManagerUtils.getUserId() + "?section=all");
}

private static boolean hasNoPlaylists(JSONArray blocks) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@ public static void addVideos(VideoFile videoFile, List<String> qualities, List<S
public static void parseVideoLink(String url, Context ctx) {
if (url.startsWith("http://")) {
url.replace("http://", "https://");
} else if (url.startsWith("vk.com"))
} else if (url.startsWith("vk.ru"))
url = "https://" + url;

if (url.contains("vk.com/story")) {
if (url.contains("vk.ru/story")) {
String storyId = url.substring(url.startsWith("https") ? 20 : 19) + "_story";

ProgressDialog progressDialog = new ProgressDialog(ctx);
Expand Down Expand Up @@ -246,7 +246,7 @@ public void a(Call call, Response response) throws IOException {
return;
}

if (!url.contains("vk.com/video")) {
if (!url.contains("vk.ru/video")) {
ToastUtils.a(ctx.getString(R.string.video_dl_wrong_link));
return;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ru.vtosters.lite.downloaders.messages;

public class Constants {
public static final String VK_DOMAIN = "vk.com";
public static final String VK_DOMAIN = "vk.ru";
public static final String HTML_DOC_STYLE = ".vtex-milk-msg {\n" +
" border-radius: 8px;\n" +
" padding: 24px;\n" +
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/ru/vtosters/lite/foaf/FoafBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static JSONObject getBypassedOnlineInfo(String ids) {

@SuppressLint("DefaultLocale")
private static String getLink(int i) {
return ProxyUtils.isAnyProxyEnabled() ? String.format("https://%s/_/vk.com/foaf.php?id=%d", ProxyUtils.getApi(), i) : String.format("https://vk.com/foaf.php?id=%d", i);
return ProxyUtils.isAnyProxyEnabled() ? String.format("https://%s/_/vk.ru/foaf.php?id=%d", ProxyUtils.getApi(), i) : String.format("https://vk.ru/foaf.php?id=%d", i);
}

public static void loadAndShow(Context context, int i) {
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/ru/vtosters/lite/proxy/ProxyUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static String getApi() {
return proxyapi;
}

return "api.vk.com";
return "api.vk.ru";
}

public static String getOauth() {
Expand All @@ -45,7 +45,7 @@ public static String getOauth() {
return oauth;
}

return "oauth.vk.com";
return "oauth.vk.ru";
}

public static String getStatic() {
Expand All @@ -59,7 +59,7 @@ public static String getStatic() {
return staticapi;
}

return "static.vk.com";
return "static.vk.ru";
}

public static Boolean isAnyProxyEnabled() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static JSONObject profileButton(JSONObject orig) {
//
// newItem.put(generateJsonObject(
// AndroidUtils.getString(com.vtosters.lite.R.string.donate_to_vtl),
// "https://vk.com/vtosters_official",
// "https://vk.ru/vtosters_official",
// "2D81E0",
// "open_url",
// map
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

public class VKAdminTokenActivity extends AppCompatActivity {

private static final String URL = "https://" + getOauth() + "/authorize?client_id=6121396&scope=1073737727&redirect_uri=https://oauth.vk.com/blank.html&display=page&response_type=token&revoke=1";
private static final String URL = "https://" + getOauth() + "/authorize?client_id=6121396&scope=1073737727&redirect_uri=https://oauth.vk.ru/blank.html&display=page&response_type=token&revoke=1";

@Override
protected void onCreate(@Nullable Bundle bundle) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public static void alert(final Activity activity) {
Preferences.getPreferences().edit().putBoolean("showAlertVkId", false).apply();
VKUIwrapper.setLink(
ProxyUtils.isAnyProxyEnabled()
? "https://id.vk.com/account"
: "https://" + ProxyUtils.getApi() + "/_/id.vk.com/account");
? "https://id.vk.ru/account"
: "https://" + ProxyUtils.getApi() + "/_/id.vk.ru/account");
NavigatorUtils.switchFragment(activity, VKUIwrapper.class);
})
.show();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private void prefs() {
});

findPreference("copyownlink").setOnPreferenceClickListener(preference -> {
copyText("https://vk.com/id" + AccountManagerUtils.getUserId());
copyText("https://vk.ru/id" + AccountManagerUtils.getUserId());
ToastUtils.a(requireContext().getString(R.string.link_copied));
return true;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public void onCreate(Bundle bundle) {
}

public void start() {
VKUIwrapper.setLink("https://vk.com/vkpay");
VKUIwrapper.setLink("https://vk.ru/vkpay");
NavigatorUtils.switchFragment(requireContext(), VKUIwrapper.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ public void onCreate(Bundle bundle) {
var args = new Bundle();
var dialog = new AboutInformation();

args.putString("vk_link", "https://vk.com/vtosters_official");
args.putString("vk_link", "https://vk.ru/vtosters_official");
args.putString("tg_link", "https://t.me/vtosters");

dialog.setArguments(args);
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/ru/vtosters/lite/utils/AndroidUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ public static boolean isLinksUnverified(Activity activity) {

Map<String, Integer> hostToStateMap = userState.getHostToStateMap();

if (hostToStateMap.containsKey("vk.com")) {
Integer stateValue = hostToStateMap.get("vk.com");
if (hostToStateMap.containsKey("vk.ru")) {
Integer stateValue = hostToStateMap.get("vk.ru");
hasUnverified = stateValue != null && stateValue != DomainVerificationUserState.DOMAIN_STATE_VERIFIED && stateValue != DomainVerificationUserState.DOMAIN_STATE_SELECTED;
}

Expand Down
8 changes: 4 additions & 4 deletions smali/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@
<category android:name="android.intent.category.BROWSABLE" />

<data
android:host="vk.com"
android:host="vk.ru"
android:pathPattern="/.*"
android:scheme="http" />
</intent-filter>
Expand All @@ -1279,7 +1279,7 @@
<category android:name="android.intent.category.BROWSABLE" />

<data
android:host="vk.com"
android:host="vk.ru"
android:pathPattern="/.*"
android:scheme="https" />
</intent-filter>
Expand Down Expand Up @@ -1451,7 +1451,7 @@

<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<data
android:host="m.vk.com"
android:host="m.vk.ru"
android:pathPattern="/.*"
android:scheme="http" />
</intent-filter>
Expand All @@ -1463,7 +1463,7 @@

<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<data
android:host="m.vk.com"
android:host="m.vk.ru"
android:pathPattern="/.*"
android:scheme="https" />
</intent-filter>
Expand Down
6 changes: 3 additions & 3 deletions smali/assets/wiki_template_article.htm
Original file line number Diff line number Diff line change
Expand Up @@ -394,12 +394,12 @@
<div class="wk_text" style="max-width: 604px">
<div class="header">
<div style="float: left;">
<a href="https://vk.com/club{GROUP_ID}">
<a href="https://vk.ru/club{GROUP_ID}">
<img src="{GROUP_PHOTO}" width="50" height="50" border="0"/>
</a>
</div>
<div class="headGroupName">
<a href="https://vk.com/club{GROUP_ID}">{GROUP_NAME}</a>
<a href="https://vk.ru/club{GROUP_ID}">{GROUP_NAME}</a>
</div>
<div class="headOrigLink">
{L_PREVIEW} <a href="http://{ORIG_URL}">{ORIG_URL}</a>
Expand All @@ -412,7 +412,7 @@
<div class="footer">
{L_SOURCE} <a href="http://{ORIG_URL}">{ORIG_URL}</a><br/>
{DATE} - {VIEWS}<br/>
<a href="https://vk.com/id{PROFILE_ID}">{L_GO_TO_GROUP}</a>
<a href="https://vk.ru/id{PROFILE_ID}">{L_GO_TO_GROUP}</a>
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion smali/res/layout/group_admin_info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
android:layout_height="wrap_content"
android:background="@null"
android:padding="0.0dip"
android:text="https://vk.com/"
android:text="https://vk.ru/"
android:textColor="#ffb8b8b8" />

<EditText
Expand Down
2 changes: 1 addition & 1 deletion smali/res/layout/settings_domain.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
android:id="@id/domain_current_link"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="https://vk.com/durov"
android:text="https://vk.ru/durov"
android:textColor="?accent"
android:textSize="14.0dip" />
</LinearLayout>
Expand Down
Loading