-
Notifications
You must be signed in to change notification settings - Fork 1
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
Update domain fronting to use new Lantern Cloud domain #1416
base: main
Are you sure you want to change the base?
Conversation
This domain will accept fronted requests as well as direct requests.
if strings.HasPrefix(r.URL.Path, "/pro/") { | ||
r.URL.Path = r.URL.Path[4:] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drive-by / fix: adding a guard here to avoid indiscriminately modifying path prefixes.
@@ -22,12 +22,12 @@ var ( | |||
maxLogSize = 10247680 | |||
|
|||
client = &http.Client{ | |||
Transport: proxied.Fronted(0), | |||
Transport: proxied.ChainedThenFronted(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will allow clients to try sending issue reports through their proxies.
I'll look at the failed tests later today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one small suggestion for using http.NoBody
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There is only a single test failing now: I'm going to go ahead and merge. Thanks for the reviews everyone! |
Co-authored-by: Wendel Hime <[email protected]>
Forgot to comment about this, but I'm actually holding off on merging until I can get the lantern-client changes done and thoroughly tested. These changes affect much of the client's ability to communicate with the back-end. I want to be sure to catch any bugs before merging this into |
This domain will accept fronted requests as well as direct requests.
This is part 1 of the work outlined in https://github.com/getlantern/engineering/issues/1429#issuecomment-2350136738. A follow-up PR will address the lantern-client changes.