Skip to content

cliHost.ts: connectLocal function and cygwin/mingw unix socket files #62

@amurzeau

Description

@amurzeau

Hi,

I'm wondering what this code is supposed to to, is it supposed to be able to connect to cygwin unix-domain sockets files ?

const socket = new net.Socket();
(async () => {
const buf = await readLocalFile(socketPath);
const i = buf.indexOf(0xa);
const port = parseInt(buf.slice(0, i).toString(), 10);
const guid = buf.slice(i + 1);
socket.connect(port, '127.0.0.1', () => {
socket.write(guid, err => {
if (err) {
console.error(err);
socket.destroy();
}
});
});
})()

In microsoft/vscode-remote-release#6719 , I've found that a modification to this function can allow VSCode to forward Git Bash's ssh-agent socket file (which use the cygwin unix domain sockets format).

Would a PR be welcome to change this function to handle cygwin unix-domain sockets files ?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions