Example doesn't work as expected
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- linux, rust
调研方向
首先使用详细日志复现文档中的 sudo httpjail 命令,然后检查最后几条日志记录附近的 Linux namespace 设置和命令执行路径,包括切换到 SUDO_USER 用户。完成的标准是 curl 命令能够完成,或报告明确的错误,而不是无限期挂起。
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Rust
- 星标
- 962
- 派生
- 28
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
coder/httpjail 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
-
难度 4/5 3-5 天 新手友好度 38/100
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 5/5 一周以上 新手友好度 30/100
-
难度 5/5 一周以上 新手友好度 25/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
TheLarkInn/aipm#2413 ·
-
documentation
难度 1/5 1 小时以内 新手友好度 90/100
alexgorbatchev/simple-ptt#15 ·
-
tooling
难度 2/5 1-3 小时 新手友好度 75/100
-
todo:ticket
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
taikoxyz/taiko-mono#22168 · 1 条评论 ·