Skip to content

Commit bec8ce1

Browse files
updated README with table of contents 2
1 parent 95f7a34 commit bec8ce1

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@
1919
- [redirect (via NAT and SO_ORIGINAL_DST)](#redirect-via-nat-and-so_original_dst)
2020
- [tproxy (via MANGLE and IP_TRANSPARENT)](#tproxy-via-mangle-and-ip_transparent)
2121
- [Links](#links)
22+
- [Contributing](#contributing)
2223
- [License](#license)
2324

2425
## Introduction
2526

27+
[[Back]](#table-of-contents)
28+
2629
`GoHPTS` CLI tool is a bridge between HTTP clients and a SOCKS5 proxy server or multiple servers (chain). It listens locally as an HTTP proxy, accepts standard HTTP
2730
or HTTPS (via CONNECT) requests and forwards the connection through a SOCKS5 proxy. Inspired by [http-proxy-to-socks](https://github.com/oyyd/http-proxy-to-socks) and [Proxychains](https://github.com/rofl0r/proxychains-ng)
2831

@@ -45,6 +48,8 @@ Specify http server in proxy configuration of Postman
4548

4649
## Features
4750

51+
[[Back]](#table-of-contents)
52+
4853
- **Proxy Chain functionality**
4954
Supports `strict`, `dynamic`, `random`, `round_robin` chains of SOCKS5 proxy
5055

@@ -77,6 +82,8 @@ Specify http server in proxy configuration of Postman
7782

7883
## Installation
7984

85+
[[Back]](#table-of-contents)
86+
8087
You can download the binary for your platform from [Releases](https://github.com/shadowy-pycoder/go-http-proxy-to-socks/releases) page.
8188

8289
Example:
@@ -104,6 +111,8 @@ make build
104111

105112
## Usage
106113

114+
[[Back]](#table-of-contents)
115+
107116
```shell
108117
gohpts -h
109118
_____ _ _ _____ _______ _____
@@ -149,6 +158,8 @@ Options:
149158

150159
### Configuration via CLI flags
151160

161+
[[Back]](#table-of-contents)
162+
152163
```shell
153164
gohpts -s 1080 -l 8080 -d -j
154165
```
@@ -205,6 +216,8 @@ kill $(pidof gohpts)
205216

206217
### Configuration via YAML file
207218

219+
[[Back]](#table-of-contents)
220+
208221
Run http proxy in SOCKS5 proxy chain mode (specify server settings via YAML configuration file)
209222

210223
```shell
@@ -263,6 +276,8 @@ To learn more about proxy chains visit [Proxychains Github](https://github.com/r
263276
264277
## Transparent proxy
265278
279+
[[Back]](#table-of-contents)
280+
266281
> Also known as an `intercepting proxy`, `inline proxy`, or `forced proxy`, a transparent proxy intercepts normal application layer communication without requiring any special client configuration. Clients need not be aware of the existence of the proxy. A transparent proxy is normally located between the client and the Internet, with the proxy performing some of the functions of a gateway or router
267282
>
268283
> -- _From [Wiki](https://en.wikipedia.org/wiki/Proxy_server)_
@@ -346,6 +361,8 @@ iptables -t nat -X GOHPTS
346361

347362
## `tproxy` (via _MANGLE_ and _IP_TRANSPARENT_)
348363

364+
[[Back]](#table-of-contents)
365+
349366
In this mode proxying happens with `iptables` `mangle` table and `TPROXY` target. Transparent proxy sees destination address as is, it is not being rewrited by the kernel. For this to work the proxy binds with socket option `IP_TRANSPARENT`, `iptables` intercepts traffic using TPROXY target, routing rules tell marked packets to go to the local proxy without changing their original destination.
350367

351368
This mode requires elevated privileges to run `GoHPTS`. You can do that by running the follwing command:
@@ -399,6 +416,8 @@ ip link del veth1
399416

400417
## Links
401418

419+
[[Back]](#table-of-contents)
420+
402421
Learn more about transparent proxies by visiting the following links:
403422

404423
- [Transparent proxy support in Linux Kernel](https://docs.kernel.org/networking/tproxy.html)
@@ -407,6 +426,20 @@ Learn more about transparent proxies by visiting the following links:
407426
- [Golang TProxy](https://github.com/KatelynHaworth/go-tproxy)
408427
- [Transparent Proxy Implementation using eBPF and Go](https://medium.com/all-things-ebpf/building-a-transparent-proxy-with-ebpf-50a012237e76)
409428

429+
## Contributing
430+
431+
[[Back]](#table-of-contents)
432+
433+
Are you a developer?
434+
435+
- Fork the repository
436+
- Create your feature branch: `git switch -c my-new-feature`
437+
- Commit your changes: `git commit -am 'Add some feature'`
438+
- Push to the branch: `git push origin my-new-feature`
439+
- Submit a pull request
440+
410441
## License
411442

443+
[[Back]](#table-of-contents)
444+
412445
MIT

0 commit comments

Comments
 (0)