File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 11
11
import time
12
12
import platform
13
13
14
- VERSION = '1.0.1064.80 '
14
+ VERSION = '1.0.1422.5 '
15
15
SSH_DIR = '~/.ssh'
16
16
CONF_PATH = SSH_DIR + '/pritunl-zero.json'
17
17
BASH_PROFILE_PATH = '~/.bash_profile'
249
249
250
250
print 'SSH_KEY: ' + conf_pub_key_path
251
251
252
+ if '--port-forward' in sys .argv [1 :] or 'port-forward' in sys .argv [1 :]:
253
+ ports = sys .argv [- 1 ].split (':' )
254
+
255
+ try :
256
+ subprocess .check_call ([
257
+ 'ssh' ,
258
+ '-N' , '-L' ,
259
+ '%s:localhost:%s' % (ports [0 ], ports [1 ]),
260
+ sys .argv [- 2 ]],
261
+ # stdout=subprocess.PIPE,
262
+ # stderr=subprocess.PIPE,
263
+ )
264
+ except KeyboardInterrupt :
265
+ sys .exit (0 )
266
+
267
+ sys .exit (0 )
268
+
252
269
if '--alias' in sys .argv [1 :] or 'alias' in sys .argv [1 :]:
253
270
bash_profile_modified = False
254
271
bash_profile_data = ''
Original file line number Diff line number Diff line change 17
17
except :
18
18
HAS_BOTO = False
19
19
20
- VERSION = '1.0.1064.80 '
20
+ VERSION = '1.0.1422.5 '
21
21
CONF_PATH = '/etc/pritunl-ssh-host.json'
22
22
DEF_SSH_CONF_PATH = '/etc/ssh/sshd_config'
23
23
DEF_PUB_KEY_CONF_PATH = '/etc/ssh/ssh_host_rsa_key.pub'
You can’t perform that action at this time.
0 commit comments