Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aybabtme/portproxy
TCP proxy, highjacks HTTP to allow CORS
https://github.com/aybabtme/portproxy
Last synced: 3 months ago
JSON representation
TCP proxy, highjacks HTTP to allow CORS
- Host: GitHub
- URL: https://github.com/aybabtme/portproxy
- Owner: aybabtme
- Created: 2014-12-13T02:57:36.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-13T03:05:07.000Z (about 10 years ago)
- Last Synced: 2024-10-14T18:08:03.219Z (3 months ago)
- Language: Go
- Homepage:
- Size: 113 KB
- Stars: 57
- Watchers: 2
- Forks: 15
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-go - portproxy - Simple TCP proxy which adds CORS support to API's which don't support it. (Networking / Transliteration)
- zero-alloc-awesome-go - portproxy - Simple TCP proxy which adds CORS support to API's which don't support it. (Networking / Transliteration)
- awesome-go-extra - portproxy - 12-13T02:57:36Z|2014-12-13T03:05:07Z| (Networking / Uncategorized)
- awesome-go-zh - portproxy
- awesome-go - portproxy - TCP proxy, highjacks HTTP to allow CORS - ★ 37 (Networking)
README
# portproxy
A shitty TCP proxy that relays all requests to a local port to a remote server.
```
portproxy -port 8080 -raddr google.com:80
```Will proxy all TCP requests on `localhost:8080` and send them to `google.com`.
## Highjacking HTTP
If the `http` flag is given:
```
portproxy -http -port 8080 -raddr google.com:80
```The proxy will attempt to detect HTTP requests. If a HTTP request contains an
`Origin` header, the response from the remote server will be modified to
include a `Access-Control-Allow-Origin: *` header.## Motivation
The sole purpose of this proxy was to bypass a remote API that didn't do CORS.