Skip to content

Block requests to localhost and similar, when not on localhost and similar - #463

Merged
pes10k merged 1 commit into
masterfrom
block-requests-to-localhost
Sep 16, 2020
Merged

Block requests to localhost and similar, when not on localhost and similar#463
pes10k merged 1 commit into
masterfrom
block-requests-to-localhost

Conversation

@pes10k

@pes10k pes10k commented Sep 15, 2020

Copy link
Copy Markdown
Collaborator

fixes #462

@liamengland1

Copy link
Copy Markdown

add an anchor || ?

@ryanbr

ryanbr commented Sep 15, 2020

Copy link
Copy Markdown
Collaborator

@antonok-edm uBO doesn't like ipv6, can adblock-rust work with ::1?

@pes10k
pes10k force-pushed the block-requests-to-localhost branch 2 times, most recently from 13239e5 to c90cc01 Compare September 15, 2020 23:12
@liamengland1

Copy link
Copy Markdown

change ~*.local to ~local. IDK if brave's adblock engine works differently but it works in uBo/abp

@pes10k
pes10k force-pushed the block-requests-to-localhost branch from c90cc01 to 5c2d4eb Compare September 15, 2020 23:30
@pes10k

pes10k commented Sep 15, 2020

Copy link
Copy Markdown
Collaborator Author

thanks @llacb47 , like i mentioned to @ryanbr, glad to have you both helping me brute force this (you can probably tell i dont write non-trivial filter list rules often ;)

@ryanbr ryanbr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If ::1 is fine then this is okay.

Comment thread brave-lists/brave-specific.txt Outdated
||localhost^$third-party,domain=~127.0.0.1|~::1|~local
||127.0.0.1^$third-party,domain=~localhost|~::1|~local
||::1^$third-party,domain=~localhost|~127.0.0.1|~local
.local^$third-party,domain=~localhost|~127.0.0.1|~::1 No newline at end of file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

These won't work as-is, but if you change them to [::1], they do work correctly.

I'll add these as tests to adblock-rust.

@ryanbr

ryanbr commented Sep 16, 2020

Copy link
Copy Markdown
Collaborator

I would also consider changing from .local^$.. to ||local^$...

@antonok-edm

antonok-edm commented Sep 16, 2020

Copy link
Copy Markdown
Collaborator

oh also, I don't think ~local is working correctly - see brave/adblock-rust#138

@pes10k

pes10k commented Sep 16, 2020

Copy link
Copy Markdown
Collaborator Author

okie dokie, will hold off on more changes until you report back :)

@pes10k
pes10k force-pushed the block-requests-to-localhost branch 2 times, most recently from b837618 to 14a5824 Compare September 16, 2020 03:01
@pes10k

pes10k commented Sep 16, 2020

Copy link
Copy Markdown
Collaborator Author

okie as discussed, going to solve this by splitting into two PRs, this one w/o .local, and #465 which adds back in the .local addresses

@pes10k
pes10k force-pushed the block-requests-to-localhost branch from 14a5824 to 37a5238 Compare September 16, 2020 03:05
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.

Block connections to localhost resources from non localhost pages

4 participants