mirror of
https://github.com/ekzhang/bore.git
synced 2025-12-17 04:17:50 +01:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
baa42d0f7b | ||
|
|
da86f5bbba | ||
|
|
0546092ce0 | ||
|
|
7fec9700c4 | ||
|
|
a1e1f55a29 |
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
|||||||
name: Build and Test
|
name: Build and Test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
name: Rustfmt
|
name: Rustfmt
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
@@ -40,7 +40,7 @@ jobs:
|
|||||||
name: Clippy
|
name: Clippy
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
|
|||||||
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
|
|||||||
15
.github/workflows/mean_bean_ci.yml
vendored
15
.github/workflows/mean_bean_ci.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
|||||||
install-cross:
|
install-cross:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 50
|
fetch-depth: 50
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ jobs:
|
|||||||
matches: ${{ matrix.platform }}
|
matches: ${{ matrix.platform }}
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v1
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: cross-${{ matrix.platform }}
|
name: cross-${{ matrix.platform }}
|
||||||
path: ${{ steps.cross.outputs.install_path }}
|
path: ${{ steps.cross.outputs.install_path }}
|
||||||
@@ -41,7 +41,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Setup | Checkout
|
- name: Setup | Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
- name: Setup | Rust
|
- name: Setup | Rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
@@ -61,12 +61,12 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: install-cross
|
needs: install-cross
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 50
|
fetch-depth: 50
|
||||||
|
|
||||||
- name: Download Cross
|
- name: Download Cross
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: cross-linux-musl
|
name: cross-linux-musl
|
||||||
path: /tmp/
|
path: /tmp/
|
||||||
@@ -89,8 +89,11 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
channel: [stable]
|
channel: [stable]
|
||||||
target:
|
target:
|
||||||
|
- aarch64-unknown-linux-musl
|
||||||
|
- arm-unknown-linux-musleabi
|
||||||
- arm-unknown-linux-gnueabi
|
- arm-unknown-linux-gnueabi
|
||||||
- armv7-unknown-linux-gnueabihf
|
- armv7-unknown-linux-gnueabihf
|
||||||
|
- armv7-unknown-linux-musleabihf
|
||||||
- i686-unknown-linux-musl
|
- i686-unknown-linux-musl
|
||||||
- x86_64-unknown-linux-musl
|
- x86_64-unknown-linux-musl
|
||||||
|
|
||||||
@@ -102,7 +105,7 @@ jobs:
|
|||||||
# artifacts are downloaded first.
|
# artifacts are downloaded first.
|
||||||
needs: install-cross
|
needs: install-cross
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 50
|
fetch-depth: 50
|
||||||
- run: ci/set_rust_version.bash ${{ matrix.channel }} ${{ matrix.target }}
|
- run: ci/set_rust_version.bash ${{ matrix.channel }} ${{ matrix.target }}
|
||||||
|
|||||||
15
.github/workflows/mean_bean_deploy.yml
vendored
15
.github/workflows/mean_bean_deploy.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
|||||||
install-cross:
|
install-cross:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 50
|
fetch-depth: 50
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ jobs:
|
|||||||
matches: ${{ matrix.platform }}
|
matches: ${{ matrix.platform }}
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v1
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: cross-${{ matrix.platform }}
|
name: cross-${{ matrix.platform }}
|
||||||
path: ${{ steps.cross.outputs.install_path }}
|
path: ${{ steps.cross.outputs.install_path }}
|
||||||
@@ -50,7 +50,7 @@ jobs:
|
|||||||
uses: dawidd6/action-get-tag@v1
|
uses: dawidd6/action-get-tag@v1
|
||||||
|
|
||||||
- name: Setup | Checkout
|
- name: Setup | Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# Cache files between builds
|
# Cache files between builds
|
||||||
- name: Setup | Cache Cargo
|
- name: Setup | Cache Cargo
|
||||||
@@ -102,8 +102,11 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target:
|
target:
|
||||||
|
- aarch64-unknown-linux-musl
|
||||||
|
- arm-unknown-linux-musleabi
|
||||||
- arm-unknown-linux-gnueabi
|
- arm-unknown-linux-gnueabi
|
||||||
- armv7-unknown-linux-gnueabihf
|
- armv7-unknown-linux-gnueabihf
|
||||||
|
- armv7-unknown-linux-musleabihf
|
||||||
- i686-unknown-linux-musl
|
- i686-unknown-linux-musl
|
||||||
- x86_64-unknown-linux-musl
|
- x86_64-unknown-linux-musl
|
||||||
steps:
|
steps:
|
||||||
@@ -111,8 +114,8 @@ jobs:
|
|||||||
id: tag
|
id: tag
|
||||||
uses: dawidd6/action-get-tag@v1
|
uses: dawidd6/action-get-tag@v1
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/download-artifact@v1
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: cross-linux-musl
|
name: cross-linux-musl
|
||||||
path: /tmp/
|
path: /tmp/
|
||||||
@@ -160,7 +163,7 @@ jobs:
|
|||||||
id: tag
|
id: tag
|
||||||
uses: dawidd6/action-get-tag@v1
|
uses: dawidd6/action-get-tag@v1
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- run: bash ci/set_rust_version.bash stable ${{ matrix.target }}
|
- run: bash ci/set_rust_version.bash stable ${{ matrix.target }}
|
||||||
- run: bash ci/build.bash cargo ${{ matrix.target }} RELEASE
|
- run: bash ci/build.bash cargo ${{ matrix.target }} RELEASE
|
||||||
- run: |
|
- run: |
|
||||||
|
|||||||
12
Cargo.lock
generated
12
Cargo.lock
generated
@@ -113,7 +113,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bore-cli"
|
name = "bore-cli"
|
||||||
version = "0.5.1"
|
version = "0.5.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"clap",
|
"clap",
|
||||||
@@ -892,20 +892,20 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tracing-log"
|
name = "tracing-log"
|
||||||
version = "0.1.3"
|
version = "0.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922"
|
checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"lazy_static",
|
|
||||||
"log",
|
"log",
|
||||||
|
"once_cell",
|
||||||
"tracing-core",
|
"tracing-core",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tracing-subscriber"
|
name = "tracing-subscriber"
|
||||||
version = "0.3.17"
|
version = "0.3.19"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77"
|
checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"nu-ansi-term",
|
"nu-ansi-term",
|
||||||
"sharded-slab",
|
"sharded-slab",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "bore-cli"
|
name = "bore-cli"
|
||||||
version = "0.5.1"
|
version = "0.5.2"
|
||||||
authors = ["Eric Zhang <ekzhang1@gmail.com>"]
|
authors = ["Eric Zhang <ekzhang1@gmail.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
description = "A modern, simple TCP tunnel in Rust that exposes local ports to a remote server, bypassing standard NAT connection firewalls."
|
description = "A modern, simple TCP tunnel in Rust that exposes local ports to a remote server, bypassing standard NAT connection firewalls."
|
||||||
@@ -29,7 +29,7 @@ sha2 = "0.10.2"
|
|||||||
tokio = { version = "1.17.0", features = ["rt-multi-thread", "io-util", "macros", "net", "time"] }
|
tokio = { version = "1.17.0", features = ["rt-multi-thread", "io-util", "macros", "net", "time"] }
|
||||||
tokio-util = { version = "0.7.1", features = ["codec"] }
|
tokio-util = { version = "0.7.1", features = ["codec"] }
|
||||||
tracing = "0.1.32"
|
tracing = "0.1.32"
|
||||||
tracing-subscriber = "0.3.10"
|
tracing-subscriber = "0.3.18"
|
||||||
uuid = { version = "1.2.1", features = ["serde", "v4"] }
|
uuid = { version = "1.2.1", features = ["serde", "v4"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|||||||
@@ -93,8 +93,8 @@ Runs the remote proxy server
|
|||||||
Usage: bore server [OPTIONS]
|
Usage: bore server [OPTIONS]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--min-port <MIN_PORT> Minimum accepted TCP port number [default: 1024]
|
--min-port <MIN_PORT> Minimum accepted TCP port number [default: 1024, env: BORE_MIN_PORT]
|
||||||
--max-port <MAX_PORT> Maximum accepted TCP port number [default: 65535]
|
--max-port <MAX_PORT> Maximum accepted TCP port number [default: 65535, env: BORE_MAX_PORT]
|
||||||
-s, --secret <SECRET> Optional secret for authentication [env: BORE_SECRET]
|
-s, --secret <SECRET> Optional secret for authentication [env: BORE_SECRET]
|
||||||
-h, --help Print help information
|
-h, --help Print help information
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ enum Command {
|
|||||||
/// Starts a local proxy to the remote server.
|
/// Starts a local proxy to the remote server.
|
||||||
Local {
|
Local {
|
||||||
/// The local port to expose.
|
/// The local port to expose.
|
||||||
|
#[clap(env = "BORE_LOCAL_PORT")]
|
||||||
local_port: u16,
|
local_port: u16,
|
||||||
|
|
||||||
/// The local host to expose.
|
/// The local host to expose.
|
||||||
@@ -36,11 +37,11 @@ enum Command {
|
|||||||
/// Runs the remote proxy server.
|
/// Runs the remote proxy server.
|
||||||
Server {
|
Server {
|
||||||
/// Minimum accepted TCP port number.
|
/// Minimum accepted TCP port number.
|
||||||
#[clap(long, default_value_t = 1024)]
|
#[clap(long, default_value_t = 1024, env = "BORE_MIN_PORT")]
|
||||||
min_port: u16,
|
min_port: u16,
|
||||||
|
|
||||||
/// Maximum accepted TCP port number.
|
/// Maximum accepted TCP port number.
|
||||||
#[clap(long, default_value_t = 65535)]
|
#[clap(long, default_value_t = 65535, env = "BORE_MAX_PORT")]
|
||||||
max_port: u16,
|
max_port: u16,
|
||||||
|
|
||||||
/// Optional secret for authentication.
|
/// Optional secret for authentication.
|
||||||
|
|||||||
Reference in New Issue
Block a user