mirror of https://github.com/ekzhang/bore.git
Initial commit
This commit is contained in:
commit
3f4cdef248
|
@ -0,0 +1,50 @@
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
rust:
|
||||||
|
name: Build and Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
|
||||||
|
- run: cargo build --all-features
|
||||||
|
|
||||||
|
- run: cargo test
|
||||||
|
|
||||||
|
rustfmt:
|
||||||
|
name: Rustfmt
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
components: rustfmt
|
||||||
|
|
||||||
|
- run: cargo fmt -- --check
|
||||||
|
|
||||||
|
clippy:
|
||||||
|
name: Clippy
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
components: clippy
|
||||||
|
|
||||||
|
- run: cargo clippy
|
|
@ -0,0 +1,2 @@
|
||||||
|
/target
|
||||||
|
Cargo.lock
|
|
@ -0,0 +1,14 @@
|
||||||
|
[package]
|
||||||
|
name = "bore-cli"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "bore"
|
||||||
|
path = "src/main.rs"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
clap = { version = "3.1.8", features = ["derive"] }
|
||||||
|
serde = { version = "1.0.136", features = ["derive"] }
|
||||||
|
serde_json = "1.0.79"
|
||||||
|
tokio = { version = "1.17.0", features = ["full"] }
|
|
@ -0,0 +1,32 @@
|
||||||
|
# bore
|
||||||
|
|
||||||
|
A modern, simple TCP tunnel in Rust that exposes local ports to a self-hosted remote server, bypassing standard NAT connection firewalls. **That's all it does: no more, and no less.**
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# Step 1: Installation (requires Rust)
|
||||||
|
cargo install bore-cli
|
||||||
|
|
||||||
|
# Step 2: On a remote server at example.com
|
||||||
|
bore proxy
|
||||||
|
|
||||||
|
# Step 3: On your local machine
|
||||||
|
bore local 8000 --to example.com:9000
|
||||||
|
```
|
||||||
|
|
||||||
|
This will expose your local port at `localhost:8000` to the public internet at `example.com:9000`.
|
||||||
|
|
||||||
|
Inspired by [localtunnel](https://github.com/localtunnel/localtunnel) and [ngrok](https://ngrok.io/), except `bore` is intended to be a highly efficient, unopinionated tool for real production workloads that is simple to install and use, with no frills attached.
|
||||||
|
|
||||||
|
## Detailed Usage
|
||||||
|
|
||||||
|
TODO
|
||||||
|
|
||||||
|
## Protocol
|
||||||
|
|
||||||
|
There is an implicit _control port_ at `7835`, used for creating new connections on demand. This can be configured in the command-line options.
|
||||||
|
|
||||||
|
## Acknowledgements
|
||||||
|
|
||||||
|
Created by Eric Zhang ([@ekzhang1](https://twitter.com/ekzhang1)). Licensed under the [MIT license](LICENSE).
|
||||||
|
|
||||||
|
The author would like to thank the contributors and maintainers of the [Tokio](https://tokio.rs/) project for making it possible to write ergonomic and efficient network services in Rust.
|
|
@ -0,0 +1,8 @@
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
#[test]
|
||||||
|
fn it_works() {
|
||||||
|
let result = 2 + 2;
|
||||||
|
assert_eq!(result, 4);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
fn main() {
|
||||||
|
println!("bore cli running");
|
||||||
|
}
|
Loading…
Reference in New Issue