Add a more explicit message when a user is set on Windows
This commit is contained in:
parent
f60395390e
commit
ceed905196
|
@ -117,11 +117,11 @@ func (proxy *Proxy) StartProxy() {
|
||||||
|
|
||||||
fdUDP, err := listenerUDP.File() // On Windows, the File method of UDPConn is not implemented.
|
fdUDP, err := listenerUDP.File() // On Windows, the File method of UDPConn is not implemented.
|
||||||
if err != nil {
|
if err != nil {
|
||||||
dlog.Fatal(err)
|
dlog.Fatalf("Unable to switch to a different user: %v", err)
|
||||||
}
|
}
|
||||||
fdTCP, err := listenerTCP.File() // On Windows, the File method of TCPListener is not implemented.
|
fdTCP, err := listenerTCP.File() // On Windows, the File method of TCPListener is not implemented.
|
||||||
if err != nil {
|
if err != nil {
|
||||||
dlog.Fatal(err)
|
dlog.Fatalf("Unable to switch to a different user: %v", err)
|
||||||
}
|
}
|
||||||
defer listenerUDP.Close()
|
defer listenerUDP.Close()
|
||||||
defer listenerTCP.Close()
|
defer listenerTCP.Close()
|
||||||
|
@ -133,13 +133,13 @@ func (proxy *Proxy) StartProxy() {
|
||||||
// child
|
// child
|
||||||
listenerUDP, err := net.FilePacketConn(os.NewFile(uintptr(3+FileDescriptorNum), "listenerUDP"))
|
listenerUDP, err := net.FilePacketConn(os.NewFile(uintptr(3+FileDescriptorNum), "listenerUDP"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
dlog.Fatal(err)
|
dlog.Fatalf("Unable to switch to a different user: %v", err)
|
||||||
}
|
}
|
||||||
FileDescriptorNum++
|
FileDescriptorNum++
|
||||||
|
|
||||||
listenerTCP, err := net.FileListener(os.NewFile(uintptr(3+FileDescriptorNum), "listenerTCP"))
|
listenerTCP, err := net.FileListener(os.NewFile(uintptr(3+FileDescriptorNum), "listenerTCP"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
dlog.Fatal(err)
|
dlog.Fatalf("Unable to switch to a different user: %v", err)
|
||||||
}
|
}
|
||||||
FileDescriptorNum++
|
FileDescriptorNum++
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue