nadoo / glider

glider is a forward proxy with multiple protocols support, and also a dns/dhcp server with ipset management features(like dnsmasq).
GNU General Public License v3.0
3.06k stars 418 forks source link

[Enhancement]: AF_VSOCK Support #295

Closed gaby closed 2 years ago

gaby commented 2 years ago

Are there any plans to add VSOCK support for Glider?

gaby commented 2 years ago

Golang libraries to support this enhancement:

https://github.com/linuxkit/virtsock https://github.com/mdlayher/vsock

Information:

https://mdlayher.com/blog/linux-vm-sockets-in-go/ https://wiki.qemu.org/Features/VirtioVsock

gaby commented 2 years ago

@nadoo Thoughts on this? VSOCKS are becoming a big thing for secure Guest-Host communications and using tools like gvisor, firecracker, kata-containers. Recent linux kernels support VSOCK natively.

nadoo commented 2 years ago

Thanks for your info, I'll add vsock support on linux version later.

gaby commented 2 years ago

Looking forward!

nadoo commented 2 years ago

Now with this commit , we can use vsock like this:

host: glider -verbose -listen vsock://:1234,socks5://

guest: glider -verbose -listen :1080 -forward vsock://2:1234,socks5://

test on guest: curl -x http://127.0.0.1:1080 ifconfig.me

gaby commented 2 years ago

@nadoo Thank you! Looking forward to testing this.

nadoo commented 2 years ago

@nadoo Thank you! Looking forward to testing this.

You can download binary file from the above link.

gaby commented 2 years ago

Thank you for this feature!