From ad01e95ec475843bf3eeb242748b029b20953ad3 Mon Sep 17 00:00:00 2001
From: Preston
Date: Sun, 31 Jul 2022 20:26:04 -0400
Subject: [PATCH] Change URL for proxy test (#2434)
---
src/renderer/components/proxy-settings/proxy-settings.js | 9 ++++-----
.../components/proxy-settings/proxy-settings.vue | 2 +-
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/renderer/components/proxy-settings/proxy-settings.js b/src/renderer/components/proxy-settings/proxy-settings.js
index 1f536e17..eaf65d42 100644
--- a/src/renderer/components/proxy-settings/proxy-settings.js
+++ b/src/renderer/components/proxy-settings/proxy-settings.js
@@ -31,8 +31,7 @@ export default Vue.extend({
return {
isLoading: false,
dataAvailable: false,
- proxyTestUrl: 'https://api.ipify.org?format=json',
- proxyTestUrl1: 'https://freegeoip.app/json/',
+ proxyTestUrl: 'https://ipwho.is/',
proxyId: '',
proxyCountry: '',
proxyRegion: '',
@@ -125,11 +124,11 @@ export default Vue.extend({
if (!this.useProxy) {
this.enableProxy()
}
- $.getJSON(this.proxyTestUrl1, (response) => {
+ $.getJSON(this.proxyTestUrl, (response) => {
console.log(response)
this.proxyIp = response.ip
- this.proxyCountry = response.country_name
- this.proxyRegion = response.region_name
+ this.proxyCountry = response.country
+ this.proxyRegion = response.region
this.proxyCity = response.city
this.dataAvailable = true
}).fail((xhr, textStatus, error) => {
diff --git a/src/renderer/components/proxy-settings/proxy-settings.vue b/src/renderer/components/proxy-settings/proxy-settings.vue
index 2ead1dfe..594aab60 100644
--- a/src/renderer/components/proxy-settings/proxy-settings.vue
+++ b/src/renderer/components/proxy-settings/proxy-settings.vue
@@ -45,7 +45,7 @@
class="center"
:style="{opacity: useProxy ? 1 : 0.4}"
>
- {{ $t('Settings.Proxy Settings.Clicking on Test Proxy will send a request to') }} https://freegeoip.app/json/
+ {{ $t('Settings.Proxy Settings.Clicking on Test Proxy will send a request to') }} {{ proxyTestUrl }}