mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-10-13 08:09:13 +00:00
On a Hyper-V system we can only register one listening endpoint (with a GUID), so we need to accept connections, read a header and then start the proxy. If the binary has argv[0] == "proxy-vsockd" then run this new frontend. Signed-off-by: David Scott <dave.scott@docker.com>
15 lines
139 B
Go
15 lines
139 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
"path"
|
|
)
|
|
|
|
func main() {
|
|
if path.Base(os.Args[0]) == "proxy-vsockd" {
|
|
manyPorts()
|
|
return
|
|
}
|
|
onePort()
|
|
}
|