#proxy-server #sqlite #http-proxy #security #http-request #requests #save

app rustyproxy-srv

用于RustyProxy项目的代理服务器。用于保存HTTP(s)请求以进行安全分析

8个稳定版本

1.0.8 2024年5月29日
1.0.7 2024年5月3日
1.0.6 2024年4月18日
1.0.5 2023年8月30日
1.0.1 2023年5月31日

#17 in WebSocket

Download history 132/week @ 2024-05-03 5/week @ 2024-05-17 114/week @ 2024-05-24 30/week @ 2024-05-31 5/week @ 2024-06-07 3/week @ 2024-06-14 5/week @ 2024-07-05 69/week @ 2024-07-26 6/week @ 2024-08-02

每月75次下载

GPL-3.0-only

120KB
2.5K SLoC

rustyproxy-srv

如果您在寻找GUI,请查看此存储库

贡献

目前优先级是制作用户界面,以便能够查看/编辑/重放请求。整体目标是提供Burpsuite的重复器和入侵者的等效功能。但此项目的这部分应仅存储来自浏览器的请求。

TL;DR:在Matrix上发消息给我,我会引导您:@vaelio

入门

如果您正在使用二进制文件

$ rustyproxy -h

rustyproxy-srv 
MITM Proxy server that stores requests in sqlite for later usage

USAGE:
    rustyproxy-srv [OPTIONS] --directory <DIRECTORY> --secret <SECRET>

OPTIONS:
    -a, --addr <ADDR>
            addr to bind to [default: 127.0.0.1]

    -A, --api-addr <API_ADDR>
            addr for the api [default: 127.0.0.1]

        --allow-localhost
            disable localhost protection

    -d, --directory <DIRECTORY>
            Path for the project to be stored

        --enable-auth
            add auth for everything

        --enable-paging
            

        --force-https
            forced target uses https ?

        --force-target <FORCE_TARGET>
            force target for any incoming request [default: ]

    -h, --help
            Print help information

    -p, --port <PORT>
            port to bind to [default: 8000]

    -P, --api-port <API_PORT>
            port for the api [default: 8443]

    -s, --secret <SECRET>
            shared secret for the API

    -S, --scope <SCOPE>
            add a scope to prevent registering out of scope stuff [default: ]

    -v, --verbose
            allow debug logs

如果您使用cargo

$ cargo run -- [OPTIONS] --directory <DIRECTORY> -s <SECRET>

例如

$ cargo run --release -- -a 0.0.0.0 -p 8080 -d /tmp/rustyproxy-project/ -s SUPAHSECRET

或者使用docker

$ sudo docker run -d -v /path/to/directory:/tmp/dir -p8000:8000 -p 8443:8443 registry.gitlab.com/r2367/rustyproxy-srv:dev-203f680e /opt/rustyproxy-srv -d /tmp/dir -s supahsecret -A 0.0.0.0 -a 0.0.0.0 -v

路线图

此项目的这部分现在处于可用状态。如果您有时间追踪导致问题的请求,请随时将其发送给我,以便我可以重现并修复。

  • HTTPS Mitm代理
  • HTTP代理
  • HTTP(s)反向代理
  • HTTPS API用于GUI
  • 上游代理
  • 处理WebSocket
  • 代码优化和错误终止

我应该期待什么样的性能?

目前应该是“相当好”,但我相信更有经验的人应该能够进一步优化。

然而,例如,我得到了相当一致的结果,如下所示:(很可能是代理的性能优势来自于我忽略了证书验证)

❯ time curl https://httpbin.org/ip 1>/dev/null 2>&1

real	0m0.405s
user	0m0.027s
sys	0m0.025s

~
❯ time curl https://httpbin.org/ip -k --proxy-insecure --proxy 127.0.0.1:8000 1>/dev/null 2>&1

real	0m0.368s
user	0m0.004s
sys	0m0.018s

本程序采用GPL-3.0许可

依赖关系

~32MB
~623K SLoC