Skip to content

Replace localhost with private IP ranges fetcher - #32

Merged
JasonLovesDoggo merged 1 commit into
JasonLovesDoggo:mainfrom
aleho:feature/private-ranges
Jan 28, 2025
Merged

JasonLovesDoggo merged 1 commit into
JasonLovesDoggo:mainfrom
aleho:feature/private-ranges

Conversation

@aleho

@aleho aleho commented Jan 28, 2025 •

Copy link
Copy Markdown
Contributor

If #33 is merged, this needs a rebase.

@JasonLovesDoggo JasonLovesDoggo left a comment

Copy link
Copy Markdown
Owner

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

aleho commented Jan 28, 2025

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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
Copy Markdown
Owner

LGTM! Thanks for the contributions!

@JasonLovesDoggo
JasonLovesDoggo merged commit 966d377 into JasonLovesDoggo:main Jan 28, 2025
@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