parro-it / open-ssh-tunnel

Easy ssh2 tunneling
MIT License
53 stars 7 forks source link

What does localAddr and localPort mean? #12

Closed zhaoyi0113 closed 6 years ago

zhaoyi0113 commented 6 years ago

I am able to use this library to create a ssh tunnel. But what I don't understand is the localAddr and localPort. In the example from the README, it is set as below value. Where is the machine for IP address 192.168.1.2? Is it a separate host or a different network interface on client host?

    localAddr: 27018,
    localPort: '192.168.1.2'
parro-it commented 6 years ago

In the example from the README, it is set as below value. Where is the machine for IP address 192.168.1.2? Is it a separate host or a different network interface on client host?

It is a different network interface on client host. You have to provide it if you want other machines in client lan to use the tunnel you create.

zhaoyi0113 commented 6 years ago

Ok, thank for your explanation.

parro-it commented 6 years ago

You're welcome :smile: