FAQs

Port Binding

Enable dxflow to bind to privileged ports (below 1024) when running as non-root user

Generally, binding to ports under 1024 requires root permissions, so you can either run dxflow as the root user or configure port permissions using the operating system-specific methods described below.

Linux

On Linux, you can use sudo or setcap:

  1. Run with sudo (simplest approach):
    sudo /path/to/dxflow
    
  2. Use setcap (recommended):
    sudo setcap 'cap_net_bind_service=+ep' /path/to/dxflow
    

This command adds the network bind service capability to the dxflow executable, allowing it to bind to privileged ports while running as a non-root user. After running this command, dxflow will be able to listen on ports like 80 or 443 without requiring root privileges.

macOS

On macOS, you can use sudo or port forwarding:

  1. Run with sudo (simplest approach):
    sudo /path/to/dxflow
    
  2. Use port forwarding (recommended):
    # Forward port 80 to 8080
    echo "rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080" | sudo pfctl -ef -
    

This command redirects traffic from privileged ports to unprivileged ones, allowing dxflow to run on a higher port number while still accepting traffic on standard ports. After running this command, dxflow will be able to receive traffic on ports like 80 or 443 without requiring root privileges.

Windows

On Windows, you can run as administrator or use netsh:

  1. Run as Administrator (simplest approach):
    # Run Command Prompt as Administrator, then:
    /path/to/dxflow.exe
    
  2. Use netsh (recommended):
    netsh http add urlacl url=http://+:80/ user=Everyone
    netsh http add urlacl url=https://+:443/ user=Everyone
    

These commands add URL ACLs that allow any user to bind to the specified ports. After running these commands, dxflow will be able to listen on ports like 80 or 443 without requiring administrator privileges.