https://github.com/mizosukedev/securetunnel
AWS secure tunneling localproxy go implementation.
https://github.com/mizosukedev/securetunnel
aws go golang localproxy securetunneling tcp tunnel
Last synced: about 2 months ago
JSON representation
AWS secure tunneling localproxy go implementation.
- Host: GitHub
- URL: https://github.com/mizosukedev/securetunnel
- Owner: mizosukedev
- License: mit
- Created: 2022-05-08T06:18:01.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-25T06:25:15.000Z (almost 4 years ago)
- Last Synced: 2025-01-28T10:30:16.626Z (over 1 year ago)
- Topics: aws, go, golang, localproxy, securetunneling, tcp, tunnel
- Language: Go
- Homepage:
- Size: 161 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AWS IoT secure tunneling localproxy implementation
- This is a repository created for studying for rehabilitation.
- I do not speak English, so corrections in English are welcome.
## Reference
- [AWS documents](https://docs.aws.amazon.com/iot/latest/developerguide/secure-tunneling.html)
- [V2WebSocketProtocolGuide.md](https://github.com/aws-samples/aws-iot-securetunneling-localproxy/blob/v2.1.0/V2WebSocketProtocolGuide.md)
## localproxy golang implementation
### Build
- You have docker environment.
``` sh
$ git clone https://github.com/mizosukedev/securetunnel
$ cd securetunnel
$ ./misc/docker/run_on_docker.sh make build
# or
$ ./misc/docker/run_on_docker.sh make
```
- You have golang environment.
``` sh
$ cd "${GOPATH}/src"
$ git clone https://github.com/mizosukedev/securetunnel
$ cd securetunnel
$ make build
# or
$ make
```
### Usage
#### Forward proxy
- Setup forward proxy, if you need. The forward proxy can be specified with the `http_proxy` and `https_proxy` environment variables.
- Exxample
``` sh
$ proxy=http://[proxy host address]:[proxy port]
$ export https_proxy=${proxy}
$ export http_proxy=${proxy}
```
#### Source mode
- Exmample:
``` sh
$ export MITRA_LOCALPROXY_TOKEN=
# If destinationConfig.services was not specified when running OpenTunnel.
$ mitra_localproxy -e "wss://data.tunneling.iot.us-east-1.amazonaws.com:443/tunnel" -s 10022
# If you specified destinationConfig.services (multiple services) when running OpenTunnel,
# specify services in the format "service name=[address:]port", separated by commas.
$ mitra_localproxy -e "wss://data.tunneling.iot.us-east-1.amazonaws.com:443/tunnel" -s "SSH=10022, RDP=13389"
```
#### Destination mode
- Example:
``` sh
$ export MITRA_LOCALPROXY_TOKEN=
# If destinationConfig.services was not specified when running OpenTunnel.
$ mitra_localproxy -e wss://data.tunneling.iot.us-east-1.amazonaws.com:443/tunnel -d 22
# If you specified destinationConfig.services (multiple services) when running OpenTunnel,
# specify services in the format "service name=[address:]port", separated by commas.
$ mitra_localproxy -e wss://data.tunneling.iot.us-east-1.amazonaws.com:443/tunnel -d "SSH=22, RDP=3389"
```
## Server (TBD)