Skip to content

Example doesn't work as expected #44

@asm0dey

Description

@asm0dey

When I call a command from examples

sudo httpjail -vvv --js "true" -- curl https://example.com
16:33:47.852 DEBUG httpjail: Starting httpjail with args: Args { sh: None, js: Some("true"), js_file: None, request_log: None, weak: false, verbose: 3, timeout: None, no_jail_cleanup: false, cleanup: false, server: false, test: None, docker_run: false, command: ["curl", "https://example.com"] }
16:33:47.852  INFO httpjail: Using V8 JavaScript rule evaluation
16:33:47.855 DEBUG httpjail::tls: Loading cached CA certificate from "/root/.config/httpjail/ca-cert.pem"
16:33:47.855  INFO httpjail::tls: Loaded cached CA certificate from /root/.config/httpjail/ca-cert.pem
16:33:47.855  INFO httpjail::tls: Certificate manager initialized
16:33:47.855 DEBUG httpjail::proxy: Created HTTPS client config with 145 trusted roots (including httpjail CA)
16:33:47.855  INFO httpjail::proxy: HTTPS connector initialized with webpki roots and httpjail CA
16:33:47.855 DEBUG httpjail::proxy: Successfully bound to port 8574
16:33:47.855  INFO httpjail::proxy: Starting HTTP proxy on port 8574
16:33:47.855 DEBUG httpjail::proxy: Successfully bound to port 8258
16:33:47.855  INFO httpjail::proxy: Starting HTTPS proxy on port 8258
16:33:47.855 DEBUG httpjail::jail::managed: Starting orphan cleanup scan in "/root/.local/share/httpjail/canaries"
16:33:47.855 DEBUG httpjail::jail::managed: Created canary file for jail 'wekc4una'
16:33:47.855  INFO httpjail::jail::linux: Setting up DNS for namespace httpjail_wekc4una with custom resolv.conf
16:33:47.855 DEBUG httpjail::jail::linux::resources: Created namespace config directory: /etc/netns/httpjail_wekc4una
16:33:47.855  INFO httpjail::jail::linux: Created namespace-specific resolv.conf at /etc/netns/httpjail_wekc4una/resolv.conf with Google DNS servers
16:33:47.857  INFO httpjail::jail::linux::resources: Created network namespace: httpjail_wekc4una
16:33:47.857  INFO httpjail::jail::linux: Created network namespace: httpjail_wekc4una
16:33:47.860 DEBUG httpjail::jail::linux::resources: Created veth pair: vh_wekc4una <-> vn_wekc4una
16:33:47.861 DEBUG httpjail::jail::linux: Created veth pair: vh_wekc4una <-> vn_wekc4una
16:33:47.879 DEBUG httpjail::jail::linux: Configured host side networking for vh_wekc4una
16:33:47.886  INFO httpjail::jail::linux: DNS already configured in namespace httpjail_wekc4una
16:33:47.895  INFO httpjail::jail::linux: Routes in namespace httpjail_wekc4una after configuration:
default via 10.99.183.193 dev vn_wekc4una
10.99.183.192/30 dev vn_wekc4una proto kernel scope link src 10.99.183.194

16:33:47.895 DEBUG httpjail::jail::linux: Configured networking inside namespace httpjail_wekc4una
16:33:47.895 DEBUG httpjail::jail::linux::nftables: Creating nftables table: httpjail_wekc4una
16:33:47.899  INFO httpjail::jail::linux::nftables: Created nftables table httpjail_wekc4una with NAT rules for subnet 10.99.183.192/30
16:33:47.899  INFO httpjail::jail::linux: Set up NAT rules for namespace httpjail_wekc4una with subnet 10.99.183.192/30
16:33:47.899 DEBUG httpjail::jail::linux::nftables: Creating nftables table in namespace httpjail_wekc4una: httpjail
16:33:47.902  INFO httpjail::jail::linux::nftables: Created nftables rules in namespace httpjail_wekc4una for HTTP:8574 HTTPS:8258
16:33:47.902  INFO httpjail::jail::linux: Linux jail setup complete using namespace httpjail_wekc4una with HTTP proxy on port 8574 and HTTPS proxy on port 8258
16:33:47.902 DEBUG httpjail::jail::managed: Created canary file for jail 'wekc4una'
16:33:47.902  INFO httpjail::jail::managed: Started lifecycle heartbeat for jail 'wekc4una'
16:33:47.902 DEBUG httpjail: Setting 6 CA certificate environment variables
16:33:47.902 DEBUG httpjail::jail::linux: Executing command in namespace httpjail_wekc4una: ["curl", "https://example.com"]
16:33:47.902 DEBUG httpjail::jail::managed: Starting heartbeat thread for "/root/.local/share/httpjail/canaries/wekc4una"
16:33:47.902 DEBUG httpjail::jail::linux: Will drop to user 'finkel' (from SUDO_USER) after entering namespace

it seems like nothing is happening and the execution never ends

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions