Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 Adding minimum and maximum port as environment variable #136

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions-rs/toolchain@v1
with:
Expand All @@ -26,7 +26,7 @@ jobs:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions-rs/toolchain@v1
with:
Expand All @@ -40,7 +40,7 @@ jobs:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions-rs/toolchain@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Docker meta
id: meta
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/mean_bean_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
install-cross:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
fetch-depth: 50

Expand All @@ -22,7 +22,7 @@ jobs:
matches: ${{ matrix.platform }}
token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
with:
name: cross-${{ matrix.platform }}
path: ${{ steps.cross.outputs.install_path }}
Expand All @@ -41,7 +41,7 @@ jobs:

steps:
- name: Setup | Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup | Rust
uses: actions-rs/toolchain@v1
with:
Expand All @@ -61,12 +61,12 @@ jobs:
runs-on: ubuntu-latest
needs: install-cross
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 50

- name: Download Cross
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name: cross-linux-musl
path: /tmp/
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
# artifacts are downloaded first.
needs: install-cross
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 50
- run: ci/set_rust_version.bash ${{ matrix.channel }} ${{ matrix.target }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/mean_bean_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
install-cross:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
fetch-depth: 50

Expand All @@ -28,7 +28,7 @@ jobs:
matches: ${{ matrix.platform }}
token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
with:
name: cross-${{ matrix.platform }}
path: ${{ steps.cross.outputs.install_path }}
Expand All @@ -50,7 +50,7 @@ jobs:
uses: dawidd6/action-get-tag@v1

- name: Setup | Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

# Cache files between builds
- name: Setup | Cache Cargo
Expand Down Expand Up @@ -114,8 +114,8 @@ jobs:
id: tag
uses: dawidd6/action-get-tag@v1

- uses: actions/checkout@v2
- uses: actions/download-artifact@v1
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: cross-linux-musl
path: /tmp/
Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
id: tag
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/build.bash cargo ${{ matrix.target }} RELEASE
- run: |
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ Runs the remote proxy server
Usage: bore server [OPTIONS]

Options:
--min-port <MIN_PORT> Minimum accepted TCP port number [default: 1024]
--max-port <MAX_PORT> Maximum accepted TCP port number [default: 65535]
--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, env: BORE_MAX_PORT]
-s, --secret <SECRET> Optional secret for authentication [env: BORE_SECRET]
-h, --help Print help information
```
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ enum Command {
/// Runs the remote proxy server.
Server {
/// Minimum accepted TCP port number.
#[clap(long, default_value_t = 1024)]
#[clap(long, default_value_t = 1024, env = "BORE_MIN_PORT")]
min_port: u16,

/// Maximum accepted TCP port number.
#[clap(long, default_value_t = 65535)]
#[clap(long, default_value_t = 65535, env = "BORE_MAX_PORT")]
max_port: u16,

/// Optional secret for authentication.
Expand Down
Loading