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

Replace localhost with private IP ranges fetcher #32

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

aleho
Copy link
Contributor

@aleho aleho commented Jan 28, 2025

If #33 is merged, this needs a rebase.

Copy link
Owner

@JasonLovesDoggo JasonLovesDoggo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do feel like the name private fetcher is a little lacking in detail but I couldn't think of anything better so that gets a pass for me.

func (f PrivateFetcher) FetchIPRanges() ([]string, error) {

return []string{
"127.0.0.0/8",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice if we could remove the overlapping IPS with localhost fetcher

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure about that, but I'll change it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to keep it close to Caddy, by the way: https://caddyserver.com/docs/caddyfile/matchers#remote-ip

@JasonLovesDoggo
Copy link
Owner

Actually, thinking about it for a minute. I feel like this could be instead layered on top of the localhost fetcher.

Perhaps rename that to local fetcher and add the missing CIDRs there

Sorry for the scattered replies, I'm just replying on my phone

@aleho aleho force-pushed the feature/private-ranges branch from 544f807 to 951f0f6 Compare January 28, 2025 09:01
@aleho
Copy link
Contributor Author

aleho commented Jan 28, 2025

Actually, thinking about it for a minute. I feel like this could be instead layered on top of the localhost fetcher.

Perhaps rename that to local fetcher and add the missing CIDRs there

The problem is, from a network perspective private IP ranges are not required to be local. 😁

@aleho aleho force-pushed the feature/private-ranges branch 2 times, most recently from 619b1c0 to 11ac0ab Compare January 28, 2025 14:22
@JasonLovesDoggo
Copy link
Owner

Actually, thinking about it for a minute. I feel like this could be instead layered on top of the localhost fetcher.

Perhaps rename that to local fetcher and add the missing CIDRs there

The problem is, from a network perspective private IP ranges are not required to be local. 😁

True! I really just created the localhost fetcher for development of this plugin. Not much thought was put into it.

You're welcome to update the PR so this new module is a direct replacement for the localhost fetcher

@aleho aleho changed the title Implement private IP ranges fetcher Replace localhost with private IP ranges fetcher Jan 28, 2025
@aleho aleho force-pushed the feature/private-ranges branch from 11ac0ab to f910338 Compare January 28, 2025 17:42
@JasonLovesDoggo
Copy link
Owner

LGTM! Thanks for the contributions!

@JasonLovesDoggo JasonLovesDoggo merged commit 966d377 into JasonLovesDoggo:main Jan 28, 2025
2 checks passed
@aleho aleho deleted the feature/private-ranges branch January 28, 2025 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants