Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: x/exp/jsonrpc2: add LocalAddr & RemoteAddr methods to *jsonrpc2.Connection #56432

Open
maxatome opened this issue Oct 26, 2022 · 4 comments
Labels
Milestone

Comments

@maxatome
Copy link

With a *jsonrpc2.Connection instance, it is not possible to know at least the remote network address.

The proposal here, is to add:

LocalAddr() net.Addr
RemoteAddr() net.Addr

methods to *jsonrpc2.Connection type.

Without breaking the compatibility they can easily be implemented as:

func (c *Connection) LocalAddr() net.Addr {
	if conn, ok := c.closer.(interface{ LocalAddr() net.Addr }); ok {
		return conn.LocalAddr()
	}
	return nil
}

func (c *Connection) RemoteAddr() net.Addr {
	if conn, ok := c.closer.(interface{ RemoteAddr() net.Addr }); ok {
		return conn.RemoteAddr()
	}
	return nil
}
@gopherbot gopherbot added this to the Proposal milestone Oct 26, 2022
@ianlancetaylor
Copy link
Contributor

CC @jba @ianthehat

@maxatome
Copy link
Author

maxatome commented Dec 8, 2022

Does someone have any news about this proposal, please?

@gopherbot
Copy link

Change https://go.dev/cl/573360 mentions this issue: ssh: validate key type in SSH_MSG_USERAUTH_PK_OK response

@drakkan
Copy link
Member

drakkan commented Mar 23, 2024

Change https://go.dev/cl/573360 mentions this issue: ssh: validate key type in SSH_MSG_USERAUTH_PK_OK response

please ignore. I referenced the wrong issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Incoming
Development

No branches or pull requests

4 participants