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

Add config options for exit routing overhaul #1015

Merged
merged 7 commits into from
Dec 2, 2024
Merged

Conversation

jkilpatr
Copy link
Member

This patch starts the exit routing overhal patch series with config changes. Namely making the exit configuration expressive enough to descirbe all of the target behaviors.

@jkilpatr jkilpatr closed this Oct 22, 2024
@jkilpatr jkilpatr reopened this Oct 22, 2024
This patch starts the exit routing overhal patch series with config
changes. Namely making the exit configuration expressive enough to
descirbe all of the target behaviors.
@jkilpatr jkilpatr force-pushed the jkilpatr/exit-cgnat branch 4 times, most recently from fbf8052 to 063e765 Compare November 7, 2024 22:21
@jkilpatr jkilpatr force-pushed the jkilpatr/exit-cgnat branch 3 times, most recently from a5d5612 to 7f324ae Compare November 11, 2024 22:18
This patch simplifies the dataflow for the rita exit module by removing
the lazy static exit database and instead holding that data in the main
rita exit thread.

In the multi-exit test this actually separates the exit databases for
the first time (they previously shared a single lazy static).
@jkilpatr jkilpatr force-pushed the jkilpatr/exit-cgnat branch 4 times, most recently from a2dc82d to bfb8119 Compare November 16, 2024 21:48
This patch adds the external ip assigment code. Design wise we're
keeping the internal subnet and simply exiting traffic at these specific
ip later on.
This patch modifies the internal ip assignment and ipv6 address
assignment to match in design and test coverage with the external ip
assignment code.

This simplification is mostly achived by removing the requirement that
clients get the same ip each time they connect even between reboots.
Reviewing the code I decided it was easier to fix that problem on the
rita_client side than to deal with the solution here.
@jkilpatr jkilpatr force-pushed the jkilpatr/exit-cgnat branch from bfb8119 to 4a77b84 Compare November 19, 2024 03:14
This patch removes handling code for wg_exit and wg_exit_v2 as
distinct interfaces. This code for handling legacy routers (beta 19 and
earlier) is no longer relevant as we're breaking compatibility with
everything up until beta 23 (this branch) anyways.
Since the exit registration smart contract does not store data about the
client wireguard listen port it exists only as a constant. Before this
patch it was two constants one in the exit code and one in the client.

It's not strictly required to set the client listen port correctly, the
server listen port is passed through the registration contract and is
sufficient to generate a handshake. But obviously there's no reason to
have two constants for the same value around.

The issue that actually generated errors was in the integration test,
where the wg_exit listen port for smart contract registration was
hardcoded indepenently of the default value in the rita_exit settings.
By unifying these constants a confusing integration test error is no
longer possible.
@jkilpatr jkilpatr merged commit a7fa72e into master Dec 2, 2024
12 of 15 checks passed
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.

1 participant