-
Notifications
You must be signed in to change notification settings - Fork 4
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
refactor: combined ForwardProxy
and ReverseProxy
into Proxy
#361
Conversation
New naming of all ports and hosts:
|
Now you can do things like:
|
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.
Just some general stuff to fix.
I can see you're new commit standard, are you following the https://www.conventionalcommits.org/en/v1.0.0/#summary standard now? I haven't had the time to bring in the commit linting into the CI/CD at this point. |
Looking at the conventional commits PRs https://github.com/conventional-commits/conventionalcommits.org/pulls, it seems that the title of the PR can be in the conventional commit structure as well, but it doesn't need to match the commit name if there are multiple commits, it can be its own message. This is because the PR title might become the merge commit message or part of it. So if you have 2 commits, then the PR title might synthesise a title from both. |
CI/CD is passing now. I'll start squashing. |
a0aaa9d
to
a056b3a
Compare
@emmacasolin note that now when running LGTM, so we can merge once CI/CD. |
Commit message typos, just need to fix that up. |
`ForwardProxy` and `ReverseProxy` has been combined into a single `Proxy`. The core part of this change is that both the proxies now share the same `UTP` socket. This allows us to get information about the reverse proxy's port when handling an incoming connection. This is critical for `NAT` punch-through procedure. Fixes #360
a056b3a
to
4e45138
Compare
I've just noticed something that was missed here. The constructor for the new Proxy takes connConnectTime?: number;
connKeepAliveTimeoutTime?: number;
connEndTime?: number;
connPunchIntervalTime?: number;
connKeepAliveIntervalTime?: number; However the connConnectTime?: number;
connTimeoutTime?: number;
connPingIntervalTime?: number; So setting any values for Also related to this issue (but not brought in by this PR) is that the |
Keep in mind with combine forward and reverse any timeout and interval settings is duplicated for both forward and reverse. This is fine, forward and reverse should have similar times for both timeout and interval. At least until we see a problem with it. |
@tegefaulkes can you push hotpatch to master regarding @emmacasolin report above. That way #357 can just directly rebase on top of master now instead of #326. |
I'll do that. I'll fix both things that were mentioned here? |
Yep. |
Pushed up the fix to master. |
Description
ForwardProxy
andReverseProxy
has been conbined into a singleProxy
. the core part of this change is that both the proxies now share the sameUTP
socket. This allows us to get information about the reverse proxy's port when handling an incoming connection. This is critical forNAT
punch-through procedure.I can just merge the branch manually but I want to do a proper review quickly and leave a paper trail. SO it's best to have this as a proper PR.
Issues Fixed
Tasks
Final checklist