Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: mobile-shell/mosh
base: master
...
head fork: washford/mosh
compare: hostname
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 11 additions and 0 deletions.
  1. +4 −0 scripts/mosh
  2. +7 −0 src/frontend/mosh-client.cc
View
4 scripts/mosh
@@ -237,6 +237,10 @@ if ( $pid == 0 ) { # child
# Now start real mosh client
$ENV{ 'MOSH_KEY' } = $key;
$ENV{ 'MOSH_PREDICTION_DISPLAY' } = $predict;
+ if ($host !~ m{^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$}) {
+ $ENV{ 'MOSH_IP' } = $ip;
+ $ip = $host;
+ }
exec {$client} ($client, $ip, $port);
}
View
7 src/frontend/mosh-client.cc
@@ -95,6 +95,13 @@ int main( int argc, char *argv[] )
char *predict_mode = getenv( "MOSH_PREDICTION_DISPLAY" );
/* can be NULL */
+ /* Read actual IP to connect to, use passed DNS name for display */
+ char *env_ip = getenv( "MOSH_IP" );
+ /* can be NULL */
+ if (env_ip != NULL) {
+ ip = env_ip;
+ }
+
char *key = strdup( env_key );
if ( key == NULL ) {
perror( "strdup" );

No commit comments for this range

Something went wrong with that request. Please try again.