Comments (6)
The code you've highlighted does not cause the connect back address to always be set to listenAddress.
The if statement checks for an error, that error indicates if the argument
--external_address
was specified. If it was, then it omits that whole block.Have you tried using
--external_address
or are you purely reading the code?
Sorry, my bad, just read the code, didn't actually test it
from reverse_ssh.
The code you've highlighted does not cause the connect back address to always be set to listenAddress.
The if statement checks for an error, that error indicates if the argument --external_address
was specified. If it was, then it omits that whole block.
Have you tried using --external_address
or are you purely reading the code?
from reverse_ssh.
What? I need more information on this.
If you're referring to the server main, connectBackAddress will be overwritten by listenAddress when --external_address
is not specified?
Which is how it's suppose to be
from reverse_ssh.
` webserver := options.IsSet("webserver")
connectBackAddress, err := options.GetArgString("external_address")
if err != nil && webserver {
connectBackAddress = listenAddress
//Special case where we're using :3232 as an example, which listens on all interfaces
//However we need to have a valid address for the link command, so we get the first interface
addressParts := strings.Split(listenAddress, ":")
if len(addressParts) > 0 && len(addressParts[0]) == 0 {
port := addressParts[1]
ifaces, err := net.Interfaces()
if err == nil {
for _, i := range ifaces {
addrs, err := i.Addrs()
if err != nil {
continue
}
if len(addrs) == 0 {
continue
}
if i.Flags&net.FlagLoopback == 0 {
connectBackAddress = strings.Split(addrs[0].String(), "/")[0] + ":" + port
break
}
}
}
}
}
`
from reverse_ssh.
` webserver := options.IsSet("webserver") connectBackAddress, err := options.GetArgString("external_address")
if err != nil && webserver { connectBackAddress = listenAddress //Special case where we're using :3232 as an example, which listens on all interfaces //However we need to have a valid address for the link command, so we get the first interface addressParts := strings.Split(listenAddress, ":") if len(addressParts) > 0 && len(addressParts[0]) == 0 { port := addressParts[1] ifaces, err := net.Interfaces() if err == nil { for _, i := range ifaces { addrs, err := i.Addrs() if err != nil { continue } if len(addrs) == 0 { continue } if i.Flags&net.FlagLoopback == 0 { connectBackAddress = strings.Split(addrs[0].String(), "/")[0] + ":" + port break } } } } }
`
we try search by connectBackAddress =
can found there are two rewriting connectBackAddress in this code
from reverse_ssh.
Please don't open issues without verifying that what you're talking about is an actual issue.
It wastes my time and makes me less open to seriously considering your issues in the future.
from reverse_ssh.
Related Issues (20)
- Jumphost not respecting server connection HOT 3
- link issue HOT 2
- garble amd64 HOT 3
- Allow clients to be identified by key comment HOT 2
- --insecure doesn't work HOT 2
- Can't use garble in link HOT 2
- Point out your wallets on the home page HOT 10
- Optimize shell acquisition order HOT 3
- The process opened by the client does not exit correctly in some scenarios HOT 9
- deployment optimization HOT 3
- Is it possible to provide an interface to obtain files HOT 1
- ask some questions HOT 5
- Exit abnormally, causing reconnection to fail HOT 2
- Is the timeout period too long? HOT 4
- Add client OS architecture HOT 10
- About authorized keys HOT 4
- Failure when trying to ssh into RSSH server HOT 10
- sftp upload file problem HOT 5
- service for .dll HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reverse_ssh.