summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorErik Larkö <erik@mullvad.net>2017-09-29 14:37:09 +0200
committerErik Larkö <erik@mullvad.net>2017-10-02 08:20:41 +0200
commit5c499db133e292efec323340a2b9f37002638d1d (patch)
tree7958a5ef67a15651ee7d9bed4a200db5a3fc0aa5
parent9547107bf5613eaa2cb430aafe24d1eff75f37c0 (diff)
downloadmullvadvpn-5c499db133e292efec323340a2b9f37002638d1d.tar.xz
mullvadvpn-5c499db133e292efec323340a2b9f37002638d1d.zip
Remove fastest and nearest servers
-rw-r--r--app/components/Connect.js39
-rw-r--r--app/components/SelectLocation.js3
-rw-r--r--app/config.json2
-rw-r--r--app/lib/backend.js27
-rw-r--r--test/components/Connect.spec.js15
5 files changed, 4 insertions, 82 deletions
diff --git a/app/components/Connect.js b/app/components/Connect.js
index 97e113a3fe..3625022634 100644
--- a/app/components/Connect.js
+++ b/app/components/Connect.js
@@ -156,32 +156,7 @@ export default class Connect extends Component {
<If condition={ isConnecting }>
<Then>
<div className="connect__status-location">
-
- <If condition={ preferredServer === 'fastest' }>
- <Then>
- <span>
- <img className="connect__status-location-icon" src="./assets/images/icon-fastest.svg" />
- { 'Fastest' }
- </span>
- </Then>
- </If>
-
- <If condition={ preferredServer === 'nearest' }>
- <Then>
- <span>
- <img className="connect__status-location-icon" src="./assets/images/icon-nearest.svg" />
- { 'Nearest' }
- </span>
- </Then>
- </If>
-
- { /* silly but react-if does not have ElseIf */ }
- <If condition={ preferredServer !== 'fastest' && preferredServer !== 'nearest' }>
- <Then>
- <span>{ country }</span>
- </Then>
- </If>
-
+ <span>{ country }</span>
</div>
</Then>
</If>
@@ -235,18 +210,6 @@ export default class Connect extends Component {
<div className="connect__server-label">Connect to</div>
<div className="connect__server-value">
- <If condition={ preferredServer === 'fastest' }>
- <Then>
- <img className="connect__server-icon" src="./assets/images/icon-fastest.svg" />
- </Then>
- </If>
-
- <If condition={ preferredServer === 'nearest' }>
- <Then>
- <img className="connect__server-icon" src="./assets/images/icon-nearest.svg" />
- </Then>
- </If>
-
<div className="connect__server-name">{ serverInfo.name }</div>
</div>
diff --git a/app/components/SelectLocation.js b/app/components/SelectLocation.js
index 4f2218d08c..5df5603f71 100644
--- a/app/components/SelectLocation.js
+++ b/app/components/SelectLocation.js
@@ -96,9 +96,6 @@ export default class SelectLocation extends Component {
While connected, your real location is masked with a private and secure location in the selected region
</div>
- { this.drawCell('fastest', 'Fastest', './assets/images/icon-fastest.svg', this.onSelect.bind(this, 'fastest')) }
- { this.drawCell('nearest', 'Nearest', './assets/images/icon-nearest.svg', this.onSelect.bind(this, 'nearest')) }
-
<div className="select-location__separator"></div>
{ Object.keys(servers).map((key) => this.drawCell(key, servers[key].name, null, this.onSelect.bind(this, key))) }
diff --git a/app/config.json b/app/config.json
index 8fda37c90f..97a297c5c3 100644
--- a/app/config.json
+++ b/app/config.json
@@ -10,7 +10,7 @@
"guides": "https://mullvad.net/guides/",
"supportEmail": "mailto:support@mullvad.net"
},
- "defaultServer": "fastest",
+ "defaultServer": "193.138.219.226",
"servers": {
"168.1.6.5": {
"address": "168.1.6.5",
diff --git a/app/lib/backend.js b/app/lib/backend.js
index ca9635951f..cbbd555987 100644
--- a/app/lib/backend.js
+++ b/app/lib/backend.js
@@ -123,34 +123,9 @@ export class Backend {
}
serverInfo(identifier: string): ?ServerInfo {
- switch(identifier) {
- case 'fastest': return this.fastestServer();
- case 'nearest': return this.nearestServer();
- default: return (servers: ServerInfoList)[identifier];
- }
- }
-
- fastestServer(): ServerInfo {
- return {
- address: '193.138.219.226',
- name: 'Fastest',
- city: 'Malmö',
- country: 'Sweden',
- location: [0.0, 0.0]
- };
+ return (servers: ServerInfoList)[identifier];
}
- nearestServer(): ServerInfo {
- return {
- address: '185.65.132.108',
- name: 'Nearest',
- city: 'Helsingborg',
- country: 'Sweden',
- location: [0.0, 0.0]
- };
- }
-
-
login(accountToken: string): Promise<void> {
log.info('Attempting to login with account number', accountToken);
diff --git a/test/components/Connect.spec.js b/test/components/Connect.spec.js
index f23f0d712c..9c280c7308 100644
--- a/test/components/Connect.spec.js
+++ b/test/components/Connect.spec.js
@@ -75,10 +75,8 @@ describe('components/Connect', () => {
expect(ipAddr.text()).to.contain('78.65.17.155');
});
- it('shows the country name or fastest/nearest in the location switcher', () => {
+ it('shows the country name in the location switcher', () => {
const servers = {
- 'fastest': { name: 'Fastest' },
- 'nearest': { name: 'Nearest' },
'se1.mullvad.net': { name: 'Sweden' },
};
const getServerInfo = (key) => servers[key] || defaultServer;
@@ -87,17 +85,6 @@ describe('components/Connect', () => {
});
const locationSwitcher = component.find('.connect__server');
-
- component.setProps({
- preferredServer: 'fastest',
- });
- expect(locationSwitcher.text()).to.contain(servers['fastest'].name);
-
- component.setProps({
- preferredServer: 'nearest',
- });
- expect(locationSwitcher.text()).to.contain(servers['nearest'].name);
-
component.setProps({
preferredServer: 'se1.mullvad.net',
});