portalgun
portalgun
lets you expose your locally running web server via a public URL.
Written in Rust. Built completely with async-io on top of tokio.
bash
cargo install portalgun
Or Download a release for your target OS here: portalgun/releases
shell script
portalgun --port 8000
The above command opens a tunnel and forwards traffic to localhost:8000
.
```shell script Expose your local web server to the internet with a public url.
Usage: portalgun [OPTIONS] [COMMAND]
Commands: login Login using OpenID Connect. This will store the authentication token on disk for future use help Print this message or the help of the given subcommand(s)
Options:
-v, --verbose
A level of verbosity, and can be used multiple times
-s, --sub-domain
Dockerfile
for a simple alpine based image that runs that server binary.Portalgun uses following custom attribute to determine user is allowed to create portal on specific subdomain.
json
{
"portalgun": [
".*",
"or-any-subdomain-matching-regexp-in-here
]
}
Admins must configure their identity provider appropriately.
```shell script
ALLOWEDHOSTS='localhost' TUNNELHOST='localhost' OIDCDISCOVERY='https://example.com/.well-known/openid-configuration' OIDCCLIENTID='openid-client-id-here' OIDCSCOPES='openid,portalgun' cargo run --bin portalgun_moon
cargo run --bin portalgun login --control-server ws://localhost:5000
curl -H '
See
portalgunmoon/src/config.rs` for the environment variables for configuration.