Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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: none

Available 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 server

2023/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)