Skip to content

Commit

Permalink
v3.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
z0ccc committed May 31, 2022
1 parent ca1a84f commit 64ff5e5
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 11 deletions.
2 changes: 1 addition & 1 deletion modules/ext/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ext",
"version": "3.4.2",
"version": "3.4.3",
"private": true,
"dependencies": {
"@babel/plugin-proposal-export-default-from": "~7.8.3",
Expand Down
2 changes: 1 addition & 1 deletion modules/ext/public/manifest/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Windscribe - Free Proxy and Ad Blocker",
"short_name": "Windscribe",
"version": "3.4.2",
"version": "3.4.3",
"description": "Windscribe helps you mask your physical location, circumvent censorship, and block ads and trackers on websites you use every day",
"content_security_policy": "script-src 'self'; object-src 'self';",
"default_locale": "en",
Expand Down
1 change: 1 addition & 0 deletions modules/ext/src/plugins/proxy/pac.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const createFindProxyForURLFunction = ({
'*://api.windscribe.com/*',
'*://assets.windscribe.com/*',
'*://*.staticnetcontent.com/*',
'*://*.totallyacdn.com/*',
'https://windscribe.com/installed/*',
].concat(userWhitelist)
Expand Down
1 change: 1 addition & 0 deletions modules/ext/src/plugins/proxy/shouldNotProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export default function shouldNotProxy(url, host, userWhitelist) {
'*://api.windscribe.com/*',
'*://assets.windscribe.com/*',
'*://*.staticnetcontent.com/*',
'*://*.totallyacdn.com/*',
'https://windscribe.com/installed/*',
].concat(userWhitelist)

Expand Down
4 changes: 2 additions & 2 deletions modules/ext/src/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export const ENVS = {
PROD: {
API_URL: 'https://api.windscribe.com',
ASSETS_URL: 'https://assets.windscribe.com',
BACKUP_API_URL: 'https://api.staticnetcontent.com',
BACKUP_ASSETS_URL: 'https://assets.staticnetcontent.com',
BACKUP_API_URL: 'https://api.totallyacdn.com',
BACKUP_ASSETS_URL: 'https://assets.totallyacdn.com',
ROOT_URL: 'https://www.windscribe.com',
TEST_LOCATION: {
locationId: 7,
Expand Down
13 changes: 9 additions & 4 deletions modules/ext/src/utils/public-ip.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
export default async () => {
const response = await fetch('https://checkipv4.windscribe.com').then(r =>
r.text(),
)
return response.trim()
const controller = new AbortController()
setTimeout(() => controller.abort(), 3000)

const response = await fetch('https://checkipv4.windscribe.com', {
signal: controller.signal,
})
.then(r => r.text())
.catch(() => '---.---.---.---')
return response
}
2 changes: 1 addition & 1 deletion modules/ext/src/views/PreferencesBlocker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export default () => {

{advancedModeEnabled && (
<SettingLink
title="µBlock Settings"
title="uBlock Settings"
openLink={() => browser.tabs.create({ url: 'options-ui/index.html' })}
/>
)}
Expand Down
16 changes: 14 additions & 2 deletions modules/ws-api-client/src/api/sendRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const sendRequest = async ({
const { lastCallTimeStamps = {}, apiCallMinInterval } = getConfig()
const params =
useBackup && endpoint.includes('ExtBlocklists') // Only need to add `domain` on ExtBlocklists
? { ...defaultParams, domain: 'staticnetcontent.com' }
? { ...defaultParams, domain: 'totallyacdn.com' }
: defaultParams

const apiUrl = prepareValidUrl({ url: endpoint, assets, useBackup })
Expand All @@ -82,7 +82,19 @@ const sendRequest = async ({
setConfig({
lastCallTimeStamps: { ...lastCallTimeStamps, [endpoint]: Date.now() },
})
const response = await _fetch(url, config)

const controller = new AbortController()

setTimeout(() => controller.abort(), 3000)
let params: RequestInit = {
headers: config.headers as HeadersInit,
method: config.method,
body: config.body,
signal: controller.signal,
}

const response = await fetch(url, params)

if (response.status === 404) {
throw {
code: response.status,
Expand Down

0 comments on commit 64ff5e5

Please sign in to comment.