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

add DnsAddress to rama-net #360

Open
GlenDC opened this issue Dec 9, 2024 · 8 comments
Open

add DnsAddress to rama-net #360

GlenDC opened this issue Dec 9, 2024 · 8 comments
Assignees
Labels
easy An easy issue to pick up for anyone. enhancement New feature or request good first issue Good for newcomers mentor available A mentor is available to help you through the issue.
Milestone

Comments

@GlenDC
Copy link
Member

GlenDC commented Dec 9, 2024

It's pretty much like Authority from the same rama-net package (https://ramaproxy.org/docs/rama/net/address/index.html)

But it is a Domain Port (u16) pair, so Domain instead of Host.

This type is convenient if you want to enforce that a Domain is used without the (type) possibility of it also being an IP.

This is a twin-issue of #358.

@GlenDC GlenDC added enhancement New feature or request good first issue Good for newcomers easy An easy issue to pick up for anyone. mentor available A mentor is available to help you through the issue. labels Dec 9, 2024
@GlenDC GlenDC added this to the v0.2 milestone Dec 9, 2024
@Muktarsadiq
Copy link

Hello Glen, i just wanted to say thank you and i'm interested in contributing to this, how can i get started ?

@GlenDC
Copy link
Member Author

GlenDC commented Dec 9, 2024

You could take a similar approach as the contributor for #358 is taking. Together with that as inspiration and this issues's description I would hope you have enough information.

But if not, do let me know with a specific set of questions you have and I'll gladly answer these.

@Hrushi20
Copy link

Hey! I'm interested in working on this issue.

@GlenDC
Copy link
Member Author

GlenDC commented Dec 28, 2024

Let's give @Muktarsadiq a day more to respond as he seemed to want to pick this up as his first contribution.

Might be that life got in the way of it or that he changed his mind as I haven't heard back from him since.

I'll assign it to you tomorrow @Hrushi20 in case he didn't come back yet with a reply or update tomorrow.

But feel free to open a PR already if you can't wait, look around the code base, make another contribution or ask for guidance or feedback in meanwhile.

Thx for the interest to participate!

@GlenDC
Copy link
Member Author

GlenDC commented Dec 29, 2024

@Hrushi20 feel free to start working on it, it's all yours now.

@Muktarsadiq in case you were temporarily out, I hope you understand. There's plenty of other fun stuff that can be done though. Feel free to reach out to me in another ticket, discord or email.

@GlenDC GlenDC assigned Hrushi20 and unassigned Muktarsadiq Dec 29, 2024
@Hrushi20
Copy link

Thank you. Looking into it.

@Hrushi20
Copy link

Is the goal to add ip_addr and port to Domain in rama-net package?

@GlenDC
Copy link
Member Author

GlenDC commented Dec 29, 2024

The goal is to have a type that you can name DomainAddress. Originally was thinking of DnsAddress, but DomainAddress is probably better of a name.

This type is similar to the SocketAddress and Authority found in https://ramaproxy.org/docs/rama/net/address/index.html.

The reason to want to have this type is because there are situations where you want to clearly communicate that you are using a domain+host pair. And it would be silly if everyone using rama needs to do that for themselves. An Authority is a Host + port. But a Host can also be an Ip address.

So therefore we need a new type. To start you can copy basically Authority but instead of using Host you want to use Domain. But you do also want a port in that type (struct) just like you have it for Authority. You can also implement From<DomainAddress> for Authority given that is always possible. The other way around is not possible in an infallible way.

Do let me know if you need more guidance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy An easy issue to pick up for anyone. enhancement New feature or request good first issue Good for newcomers mentor available A mentor is available to help you through the issue.
Projects
None yet
Development

No branches or pull requests

3 participants