File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change
1
+ build : execd
2
+ go build .
1
3
2
- build :
3
- go build .
4
+ example : build
5
+ ./execd -h localhost -p 2022 -k example/host_pk.pem example/authcheck example/helloworld
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import (
22
22
"github.com/flynn/go-shlex"
23
23
)
24
24
25
+ var host = flag .String ("h" , "" , "host ip to listen on" )
25
26
var port = flag .String ("p" , "22" , "port to listen on" )
26
27
var debug = flag .Bool ("d" , false , "debug mode displays handler output" )
27
28
var env = flag .Bool ("e" , false , "pass environment to handlers" )
@@ -206,7 +207,7 @@ func main() {
206
207
if p := os .Getenv ("PORT" ); p != "" && * port == "22" {
207
208
* port = p
208
209
}
209
- listener , err := net .Listen ("tcp" , ":" + * port )
210
+ listener , err := net .Listen ("tcp" , * host + ":" + * port )
210
211
if err != nil {
211
212
log .Fatalln ("Failed to listen for connections:" , err )
212
213
}
You can’t perform that action at this time.
0 commit comments