Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chhsiao90/nitmproxy
Proxy server based on netty
https://github.com/chhsiao90/nitmproxy
http http-proxy http2 netty proxy tls
Last synced: 9 days ago
JSON representation
Proxy server based on netty
- Host: GitHub
- URL: https://github.com/chhsiao90/nitmproxy
- Owner: chhsiao90
- License: mit
- Created: 2017-03-12T09:02:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-10T18:57:32.000Z (over 1 year ago)
- Last Synced: 2024-10-15T09:49:50.417Z (21 days ago)
- Topics: http, http-proxy, http2, netty, proxy, tls
- Language: Java
- Size: 312 KB
- Stars: 151
- Watchers: 10
- Forks: 68
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Java CI](https://github.com/chhsiao90/nitmproxy/actions/workflows/ci.yml/badge.svg)](https://github.com/chhsiao90/nitmproxy/actions/workflows/ci.yml)
# Netty in the Middle
An experimental proxy server based on [netty](https://github.com/netty/netty).
That want to show how fast the netty is, and how the API design of netty is pretty.## Start nitmproxy
```
> ./nitmproxy.sh --help
usage: nitmproxy [--cert ] [--clientNoHttp2] [-h ] [-k]
[--key ] [-m ] [-p ] [--serverNoHttp2]
--cert x509 certificate used by server(*.pem),
default: server.pem
-h,--host listening host, default: 127.0.0.1
-k,--insecure not verify on server certificate
--key key used by server(*.pem), default: key.pem
-m,--mode proxy mode(HTTP, SOCKS, TRANSPARENT), default: HTTP
-p,--port listening port, default: 8080
```## Features
### Support Proxy
- HTTP Proxy
- HTTP Proxy (Tunnel)
- Socks Proxy
- Transparent Proxy### Support Protocol
- HTTP/1
- HTTP/2
- WebSocket
- TLS### Support Functionality
- Display network traffic
- Modify network traffic## Development
### Coding Style
We are using same coding style with netty, please follow the instructions from the [netty#Setting up development environment](https://netty.io/wiki/setting-up-development-environment.html) to setup.
## FAQ
### Android
The built-in [Conscrypt](https://github.com/google/conscrypt) in the Android is not compatible with [Netty](https://github.com/netty/netty). The easiest way to fix is to add Conscrypt manually.
**Add conscrypt-android dependency**
https://search.maven.org/artifact/org.conscrypt/conscrypt-android
**Configure Conscrypt SSL provider**
```java
config.setSslProvider(Conscrypt.newProvider());
```### For a transparent proxy, how do I port forward HTTP/HTTPS requests?
### Linux
```
sysctl -w net.ipv4.ip_forward=1
sysctl -w net.ipv6.conf.all.forwarding=1
sysctl -w net.ipv4.conf.all.send_redirects=0
iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to-destination :
iptables -t nat -A OUTPUT -p tcp --dport 443 -j DNAT --to-destination :
```
See Linux documentation on how to persistent these changes across reboots.