diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2018-10-05 11:20:09 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2018-10-05 15:50:40 +0200 |
| commit | 5cf09ec693285d9cfa947ce794b900645ca16e54 (patch) | |
| tree | fe1bf132a1e29a3776059b8e32b1ee1484dd58be /gui | |
| parent | 3e33f9dcfbdf9ac24ef222a12868798cf9f22cf8 (diff) | |
| download | mullvadvpn-5cf09ec693285d9cfa947ce794b900645ca16e54.tar.xz mullvadvpn-5cf09ec693285d9cfa947ce794b900645ca16e54.zip | |
Don't rely on exit ip in relay_list
Instead, show the hostname in the UI
Diffstat (limited to 'gui')
4 files changed, 8 insertions, 15 deletions
diff --git a/gui/packages/desktop/src/renderer/app.js b/gui/packages/desktop/src/renderer/app.js index e973340107..ad7cea7c74 100644 --- a/gui/packages/desktop/src/renderer/app.js +++ b/gui/packages/desktop/src/renderer/app.js @@ -339,12 +339,12 @@ export default class AppRenderer { log.info('Got location from daemon'); const locationUpdate = { - ip: location.ip, country: location.country, city: location.city, latitude: location.latitude, longitude: location.longitude, mullvadExitIp: location.mullvad_exit_ip, + hostname: location.hostname, }; actions.connection.newLocation(locationUpdate); diff --git a/gui/packages/desktop/src/renderer/components/Connect.js b/gui/packages/desktop/src/renderer/components/Connect.js index 9fc7a7de61..11fb6d9d70 100644 --- a/gui/packages/desktop/src/renderer/components/Connect.js +++ b/gui/packages/desktop/src/renderer/components/Connect.js @@ -176,7 +176,7 @@ export default class Connect extends Component<Props> { selectedRelayName={this.props.selectedRelayName} city={this.props.connection.city} country={this.props.connection.country} - ip={this.props.connection.ip} + hostname={this.props.connection.hostname} onConnect={this.props.onConnect} onDisconnect={this.props.onDisconnect} onSelectLocation={this.props.onSelectLocation} @@ -318,13 +318,7 @@ export function TunnelControl(props: TunnelControlProps) { const Location = ({ children }) => <View style={styles.status_location}>{children}</View>; const City = () => <Text style={styles.status_location_text}>{props.city}</Text>; const Country = () => <Text style={styles.status_location_text}>{props.country}</Text>; - const Ip = () => ( - <ClipboardLabel - style={styles.status_ipaddress} - value={props.ip || ''} - message={'IP copied to clipboard!'} - /> - ); + const Hostname = () => <Text style={styles.status_hostname}>{props.hostname || ''}</Text>; const SwitchLocation = () => { return ( @@ -379,6 +373,7 @@ export function TunnelControl(props: TunnelControlProps) { <Location> <City /> </Location> + <Hostname /> </Body> <Footer> <SwitchLocation /> @@ -395,7 +390,7 @@ export function TunnelControl(props: TunnelControlProps) { <City /> <Country /> </Location> - <Ip /> + <Hostname /> </Body> <Footer> <SwitchLocation /> @@ -425,7 +420,6 @@ export function TunnelControl(props: TunnelControlProps) { <Location> <Country /> </Location> - <Ip /> </Body> <Footer> <SelectedLocation /> @@ -442,7 +436,6 @@ export function TunnelControl(props: TunnelControlProps) { <Location> <Country /> </Location> - <Ip /> </Body> <Footer> <SelectedLocation /> diff --git a/gui/packages/desktop/src/renderer/components/ConnectStyles.js b/gui/packages/desktop/src/renderer/components/ConnectStyles.js index b882afb930..54b784c415 100644 --- a/gui/packages/desktop/src/renderer/components/ConnectStyles.js +++ b/gui/packages/desktop/src/renderer/components/ConnectStyles.js @@ -76,11 +76,12 @@ export default { lineHeight: 22, marginBottom: 4, }), - status_ipaddress: Styles.createTextStyle({ + status_hostname: Styles.createTextStyle({ fontFamily: 'Open Sans', fontSize: 16, fontWeight: '800', color: colors.white, + paddingBottom: 2, }), status_location: Styles.createTextStyle({ flexDirection: 'column', diff --git a/gui/packages/desktop/src/renderer/lib/daemon-rpc.js b/gui/packages/desktop/src/renderer/lib/daemon-rpc.js index cece79f783..8192f967b9 100644 --- a/gui/packages/desktop/src/renderer/lib/daemon-rpc.js +++ b/gui/packages/desktop/src/renderer/lib/daemon-rpc.js @@ -33,12 +33,12 @@ export type Location = { mullvad_exit_ip: boolean, }; const LocationSchema = object({ - ip: string, country: string, city: maybe(string), latitude: number, longitude: number, mullvad_exit_ip: boolean, + hostname: maybe(string), }); export type BlockReason = @@ -207,7 +207,6 @@ const RelayListSchema = object({ object({ hostname: string, ipv4_addr_in: string, - ipv4_addr_exit: string, include_in_country: boolean, weight: number, }), |
