mirror of
https://github.com/samsonjs/agate.git
synced 2026-03-25 09:05:50 +00:00
Compare commits
20 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92093a84ab | ||
|
|
26482e38c0 | ||
|
|
22b6dd50af | ||
|
|
11c569b4ec | ||
|
|
067e220145 | ||
|
|
7a5ef98ea8 | ||
|
|
b142891abe | ||
|
|
e758138c58 | ||
|
|
1807524209 | ||
|
|
9daefcd3c4 | ||
|
|
dee79f819c | ||
|
|
c385a11999 | ||
|
|
ef39d78f08 | ||
|
|
b0d30df91a | ||
|
|
d8481a2b0f | ||
|
|
5cdfb3dc4b | ||
|
|
90dcaff231 | ||
|
|
1091812e13 | ||
|
|
8a6de275ca | ||
|
|
1e84541bbb |
6 changed files with 427 additions and 240 deletions
2
.github/workflows/cargo-audit.yml
vendored
2
.github/workflows/cargo-audit.yml
vendored
|
|
@ -10,7 +10,7 @@ jobs:
|
||||||
cargo-audit:
|
cargo-audit:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- uses: actions-rs/audit-check@v1
|
- uses: actions-rs/audit-check@v1
|
||||||
# Don't run on dependabot PRs or forks
|
# Don't run on dependabot PRs or forks
|
||||||
# https://github.com/actions-rs/clippy-check/issues/2#issuecomment-807852653
|
# https://github.com/actions-rs/clippy-check/issues/2#issuecomment-807852653
|
||||||
|
|
|
||||||
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
|
|
@ -18,7 +18,7 @@ jobs:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
needs: create_release
|
needs: create_release
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- name: build
|
- name: build
|
||||||
run: bash .github/workflows/release.sh
|
run: bash .github/workflows/release.sh
|
||||||
- name: upload release assets linux
|
- name: upload release assets linux
|
||||||
|
|
@ -32,7 +32,7 @@ jobs:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: create_release
|
needs: create_release
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --verbose --release
|
run: cargo build --verbose --release
|
||||||
- name: strip names
|
- name: strip names
|
||||||
|
|
@ -50,7 +50,7 @@ jobs:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
needs: create_release
|
needs: create_release
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- name: install toolchain
|
- name: install toolchain
|
||||||
run: rustup target add aarch64-apple-darwin
|
run: rustup target add aarch64-apple-darwin
|
||||||
- name: Build x86_64
|
- name: Build x86_64
|
||||||
|
|
@ -79,7 +79,7 @@ jobs:
|
||||||
packages: write
|
packages: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Log into GHCR
|
- name: Log into GHCR
|
||||||
|
|
|
||||||
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
|
|
@ -12,7 +12,7 @@ jobs:
|
||||||
clippy:
|
clippy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- name: Run clippy action to produce annotations
|
- name: Run clippy action to produce annotations
|
||||||
# Don't run on dependabot PRs
|
# Don't run on dependabot PRs
|
||||||
# https://github.com/actions-rs/clippy-check/issues/2#issuecomment-807852653
|
# https://github.com/actions-rs/clippy-check/issues/2#issuecomment-807852653
|
||||||
|
|
@ -30,7 +30,7 @@ jobs:
|
||||||
formatting:
|
formatting:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- name: Formatting
|
- name: Formatting
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
|
|
@ -39,7 +39,7 @@ jobs:
|
||||||
tests:
|
tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
|
|
|
||||||
627
Cargo.lock
generated
627
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
10
Cargo.toml
10
Cargo.toml
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "agate"
|
name = "agate"
|
||||||
version = "3.3.19"
|
version = "3.3.20"
|
||||||
authors = ["Matt Brubeck <mbrubeck@limpet.net>", "Johann150 <johann+agate@qwertqwefsday.eu>"]
|
authors = ["Matt Brubeck <mbrubeck@limpet.net>", "Johann150 <johann+agate@qwertqwefsday.eu>"]
|
||||||
description = "Very simple server for the Gemini hypertext protocol"
|
description = "Very simple server for the Gemini hypertext protocol"
|
||||||
keywords = ["server", "gemini", "hypertext", "internet", "protocol"]
|
keywords = ["server", "gemini", "hypertext", "internet", "protocol"]
|
||||||
|
|
@ -20,10 +20,10 @@ glob = "0.3"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
mime_guess = "2.0"
|
mime_guess = "2.0"
|
||||||
percent-encoding = "2.3"
|
percent-encoding = "2.3"
|
||||||
rcgen = { version = "0.14.4", default-features = false, features = ["ring"] }
|
rcgen = { version = "0.14.7", default-features = false, features = ["ring"] }
|
||||||
tokio-rustls = { version = "0.26.3", default-features = false, features = ["logging", "ring", "tls12"] }
|
tokio-rustls = { version = "0.26.4", default-features = false, features = ["logging", "ring", "tls12"] }
|
||||||
tokio = { version = "1.47", features = ["fs", "io-util", "net", "rt-multi-thread", "sync"] }
|
tokio = { version = "1.49", features = ["fs", "io-util", "net", "rt-multi-thread", "sync"] }
|
||||||
url = "2.5.5"
|
url = "2.5.8"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
trotter = "1.0"
|
trotter = "1.0"
|
||||||
|
|
|
||||||
14
src/main.rs
14
src/main.rs
|
|
@ -313,17 +313,15 @@ fn args() -> Result<Args> {
|
||||||
let cert = cert_params.self_signed(&key_pair)?;
|
let cert = cert_params.self_signed(&key_pair)?;
|
||||||
|
|
||||||
// make sure the certificate directory exists
|
// make sure the certificate directory exists
|
||||||
fs::create_dir(certs_path.join(domain))?;
|
let cert_dir = certs_path.join(domain);
|
||||||
|
fs::create_dir(&cert_dir)?;
|
||||||
|
|
||||||
// write certificate data to disk
|
// write certificate data to disk
|
||||||
let mut cert_file = File::create(certs_path.join(format!(
|
let mut cert_file = File::create(cert_dir.join(certificates::CERT_FILE_NAME))?;
|
||||||
"{}/{}",
|
|
||||||
domain,
|
|
||||||
certificates::CERT_FILE_NAME
|
|
||||||
)))?;
|
|
||||||
cert_file.write_all(cert.der())?;
|
cert_file.write_all(cert.der())?;
|
||||||
|
|
||||||
// write key data to disk
|
// write key data to disk
|
||||||
let key_file_path =
|
let key_file_path = cert_dir.join(certificates::KEY_FILE_NAME);
|
||||||
certs_path.join(format!("{}/{}", domain, certificates::KEY_FILE_NAME));
|
|
||||||
let mut key_file = File::create(&key_file_path)?;
|
let mut key_file = File::create(&key_file_path)?;
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue