Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juzeon/tun4colab
A helper program that allows for parallel execution of API services and utilizes Cloudflare Quick Tunnel for port forwarding on Google Colab.
https://github.com/juzeon/tun4colab
cloudflare cloudflare- cloudflare-argo cloudflare-argo-tunnel cloudflare-tunnel cloudflared colab colab-notebook colaboratory google-colab google-colab-notebook google-colaboratory
Last synced: 3 months ago
JSON representation
A helper program that allows for parallel execution of API services and utilizes Cloudflare Quick Tunnel for port forwarding on Google Colab.
- Host: GitHub
- URL: https://github.com/juzeon/tun4colab
- Owner: juzeon
- License: mit
- Created: 2023-11-08T11:30:15.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-08T14:26:04.000Z (about 1 year ago)
- Last Synced: 2024-03-22T07:02:21.727Z (11 months ago)
- Topics: cloudflare, cloudflare-, cloudflare-argo, cloudflare-argo-tunnel, cloudflare-tunnel, cloudflared, colab, colab-notebook, colaboratory, google-colab, google-colab-notebook, google-colaboratory
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tun4colab
A helper program that allows for parallel execution of API services and utilizes Cloudflare Quick Tunnel for port forwarding on Google Colab.
## Build
Requires Go 1.21+
```bash
# If using Windows
set GOOS=linux
set GOARCH=amd64# Build for colab
go build
```## Usage
```bash
-p -p ... -p
-c -c ... -c
```e.g.
```bash
./tun4colab -p 8080 -p 8081 -c "http-server -p 8080" -c "python api.py -p 8081"
```The output of the API services will be redirected to stdout, while the endpoints of the tunnels will be printed once they are created.
## Example
```bash
> ./tun4colab -p 8081 -c "cd D:\Go && http-server -p 8081"
2023/11/08 22:24:00 INFO Ports to open: ports=[8081]
2023/11/08 22:24:00 INFO Commands to execute: commands="cd D:\\Go && http-server -p 8081"
Starting up http-server, serving ./http-server version: 14.1.1
http-server settings:
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: noneAvailable on:
http://2.0.0.1:8081
http://172.20.160.1:8081
http://192.168.137.1:8081
http://192.168.58.1:8081
http://192.168.168.1:8081
http://10.27.214.248:8081
http://127.0.0.1:8081
Hit CTRL-C to stop the server2023/11/08 22:24:03 INFO Tunnel created port=8081 url=https://mas-production-complicated-tag.trycloudflare.com
```![](https://public.ptree.top/ShareX/2023/11/08/1699453519/AEjbKXeXOd.png)