summaryrefslogtreecommitdiffhomepage
path: root/app/components
diff options
context:
space:
mode:
authorErik Larkö <erik@mullvad.net>2017-09-12 13:33:46 +0200
committerErik Larkö <erik@mullvad.net>2017-09-12 13:46:04 +0200
commit4ed0102b38aa29bee9b0a876ec48c48d715f644e (patch)
tree4c3334ed98f97b2c83c9b49f448c790810a5f835 /app/components
parentd541f4ee98182faa6c4e52727c948612b4d7ad53 (diff)
downloadmullvadvpn-4ed0102b38aa29bee9b0a876ec48c48d715f644e.tar.xz
mullvadvpn-4ed0102b38aa29bee9b0a876ec48c48d715f644e.zip
Move the hardcoded relay endpoint data to the Connect component
Diffstat (limited to 'app/components')
-rw-r--r--app/components/Connect.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/components/Connect.js b/app/components/Connect.js
index 7d6269655a..66696fef64 100644
--- a/app/components/Connect.js
+++ b/app/components/Connect.js
@@ -10,6 +10,7 @@ import ExternalLinkSVG from '../assets/images/icon-extLink.svg';
import type { ServerInfo } from '../lib/backend';
import type { HeaderBarStyle } from './HeaderBar';
import type { ConnectionReduxState } from '../redux/connection/reducers';
+import type { RelayEndpoint } from '../lib/ipc-facade';
export type ConnectProps = {
accountExpiry: string,
@@ -17,7 +18,7 @@ export type ConnectProps = {
preferredServer: string,
onSettings: () => void,
onSelectLocation: () => void,
- onConnect: (address: string) => void,
+ onConnect: (relayEndpoint: RelayEndpoint) => void,
onCopyIP: () => void,
onDisconnect: () => void,
onExternalLink: (type: string) => void,
@@ -301,7 +302,12 @@ export default class Connect extends Component {
const preferredServer = this.props.preferredServer;
const serverInfo = this.props.getServerInfo(preferredServer);
if(serverInfo) {
- this.props.onConnect(serverInfo.address);
+ // TODO: Don't use these hardcoded values
+ this.props.onConnect({
+ host: serverInfo.address,
+ port: 1300,
+ protocol: 'udp',
+ });
}
}