https://github.com/jcsalterego/caddyfwd
SSL forwarding (powered by caddy) with arbitrary hostnames.
https://github.com/jcsalterego/caddyfwd
Last synced: 12 months ago
JSON representation
SSL forwarding (powered by caddy) with arbitrary hostnames.
- Host: GitHub
- URL: https://github.com/jcsalterego/caddyfwd
- Owner: jcsalterego
- License: other
- Created: 2022-03-21T14:18:18.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-22T17:28:57.000Z (about 4 years ago)
- Last Synced: 2025-01-17T16:37:31.203Z (over 1 year ago)
- Language: Shell
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
caddyfwd
========
SSL forwarding (powered by `caddy`) with arbitrary hostnames.
### Usage
```
./caddyfwd [[:]] [:]
```
### Requirements
* [caddy](https://caddyserver.com) and `caddy trust`
* [jq](https://stedolan.github.io/jq/)
### Examples
#### Simple forward to `localhost:11111`
```
$ ./caddyfwd localhost:11111
Proxying localhost:443 -> localhost:11111
2022/03/21 14:14:50.645 INFO admin admin endpoint started
{"address": "tcp/localhost:2019", "enforce_origin": false,
"origins": ["localhost:2019", "[::1]:2019", "127.0.0.1:2019"]}
2022/03/21 14:14:50.646 INFO serving initial configuration
```
#### Simple forward when `www.example.org` is mapped in your `/etc/hosts`
```
$ ./caddyfwd www.example.org localhost:11111
Proxying www.example.org:443 -> localhost:11111
2022/03/21 14:15:29.378 INFO admin admin endpoint started
{"address": "tcp/localhost:2019", "enforce_origin": false,
"origins": ["localhost:2019", "[::1]:2019", "127.0.0.1:2019"]}
2022/03/21 14:15:29.379 INFO serving initial configuration
```
#### Mapping to a weird port and a nice check of your `/etc/hosts`
```
./caddyfwd www.example.net:38522 localhost:11111
warning: www.example.net missing from /etc/hosts
Proxying www.example.net:38522 -> localhost:11111
2022/03/21 14:17:23.709 INFO admin admin endpoint started
{"address": "tcp/localhost:2019", "enforce_origin": false,
"origins": ["localhost:2019", "[::1]:2019", "127.0.0.1:2019"]}
2022/03/21 14:17:23.709 INFO serving initial configuration
```