Skip to content

Commit

Permalink
feat: Allow XDP when force flag is set (#1070)
Browse files Browse the repository at this point in the history
  • Loading branch information
XAMPPRocky authored Jan 21, 2025
1 parent 7bfb3a6 commit ab30d6b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ impl Proxy {
) -> eyre::Result<Box<dyn FnOnce(crate::ShutdownRx) + Send>> {
#[cfg(target_os = "linux")]
{
match self.spawn_xdp(config.clone()) {
match self.spawn_xdp(config.clone(), self.xdp.force_xdp) {
Ok(xdp) => {
return Ok(xdp);
}
Expand Down Expand Up @@ -359,13 +359,14 @@ impl Proxy {
fn spawn_xdp(
&mut self,
config: Arc<crate::config::Config>,
force_xdp: bool,
) -> eyre::Result<Box<dyn FnOnce(crate::ShutdownRx) + Send>> {
use crate::net::xdp;
use eyre::Context as _;

// TODO: remove this once it's been more stabilized
if true {
eyre::bail!("temporarily disabled");
if !force_xdp {
eyre::bail!("XDP currently disabled by default");
}

let Some(external_port) = self.socket.as_ref().and_then(|s| {
Expand Down

0 comments on commit ab30d6b

Please sign in to comment.