Skip to content

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

Closed

Description

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 ?

Activity

  1. chrmarti commented on Jul 4, 2022

    @chrmarti
    Contributor

    The current code handles socket paths on Windows (parsing port and GUID from the file at the path, microsoft/vscode-remote-release#72). What did you have to change to make it work with Cygwin socket paths? (PR welcome.)

  2. added
    bug
    info-needed
    on Jul 4, 2022
  3. removed
    info-needed
    on Jul 15, 2022
  4. added a commit that references this issue on Jul 23, 2022
    9245a1c
  5. added 2 commits that reference this issue on Nov 10, 2022
    9e65800
    bd684d6
  6. added a commit that references this issue on Nov 14, 2022
    6ebc652
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions