OmniSSHAgent icon indicating copy to clipboard operation
OmniSSHAgent copied to clipboard

No using asyncIO or Overlapped Results.

Open boostchicken opened this issue 1 year ago • 3 comments

https://github.com/boostchicken/wsl2-gpg-ssh-agent/blob/407c5280abf6864e59df3f4d63e910e299951609/main.go#L338-L364

https://github.com/boostchicken/wsl2-gpg-ssh-agent/blob/main/overlapped.go

This is why you are seeing some issues with multiple processes not using pipes correctly I double chechekd go-wino's code and they still don't use it where it's needed or make use of events which really lowers processing overhead (my code does this)

also why not use a vsock in SOCAT, safer, faster, support in Go for it. Just connect a vsock right to your namedpipe.

That we repo is mine and I have been using it for a while. Feel free to steal anything you want.

boostchicken avatar Jul 27 '23 02:07 boostchicken

https://learn.microsoft.com/en-us/windows/win32/devio/overlapped-operations

If you are sstill curious. There is also service creation code in there, code to set env vars.

boostchicken avatar Jul 27 '23 03:07 boostchicken

I didn't know about vsock. Thank you. I will try various experiments.

masahide avatar Jul 29 '23 10:07 masahide

https://github.com/nbdd0121/wsld/blob/master/docs/impl.md#finding-the-vm

WSL utility VM is not a regular Hyper-V VM. It will not show up in Hyper-V Manager, and normal Hyper-V API and commands do not apply to the WSL VM. Integration service that listens on wildcard VMID will not accept connections from WSL VM. The only way around is to retrieve WSL VM's VMID and listen on that specific address. User can use hcsdiag list to obtain the VMID, while we use a semi-documented API called HcsEnumerateComputeSystems to obtain the VMID. Both methods require administrator privilege.

This might be a bit tricky...

masahide avatar Jul 30 '23 00:07 masahide