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:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions-rs/audit-check@v1
|
||||
# Don't run on dependabot PRs or forks
|
||||
# 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
|
||||
needs: create_release
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
- name: build
|
||||
run: bash .github/workflows/release.sh
|
||||
- name: upload release assets linux
|
||||
|
|
@ -32,7 +32,7 @@ jobs:
|
|||
runs-on: windows-latest
|
||||
needs: create_release
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
- name: Build
|
||||
run: cargo build --verbose --release
|
||||
- name: strip names
|
||||
|
|
@ -50,7 +50,7 @@ jobs:
|
|||
runs-on: macos-latest
|
||||
needs: create_release
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
- name: install toolchain
|
||||
run: rustup target add aarch64-apple-darwin
|
||||
- name: Build x86_64
|
||||
|
|
@ -79,7 +79,7 @@ jobs:
|
|||
packages: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Log into GHCR
|
||||
|
|
|
|||
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
|
|
@ -12,7 +12,7 @@ jobs:
|
|||
clippy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
- name: Run clippy action to produce annotations
|
||||
# Don't run on dependabot PRs
|
||||
# https://github.com/actions-rs/clippy-check/issues/2#issuecomment-807852653
|
||||
|
|
@ -30,7 +30,7 @@ jobs:
|
|||
formatting:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
- name: Formatting
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
|
|
@ -39,7 +39,7 @@ jobs:
|
|||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
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]
|
||||
name = "agate"
|
||||
version = "3.3.19"
|
||||
version = "3.3.20"
|
||||
authors = ["Matt Brubeck <mbrubeck@limpet.net>", "Johann150 <johann+agate@qwertqwefsday.eu>"]
|
||||
description = "Very simple server for the Gemini hypertext protocol"
|
||||
keywords = ["server", "gemini", "hypertext", "internet", "protocol"]
|
||||
|
|
@ -20,10 +20,10 @@ glob = "0.3"
|
|||
log = "0.4"
|
||||
mime_guess = "2.0"
|
||||
percent-encoding = "2.3"
|
||||
rcgen = { version = "0.14.4", default-features = false, features = ["ring"] }
|
||||
tokio-rustls = { version = "0.26.3", default-features = false, features = ["logging", "ring", "tls12"] }
|
||||
tokio = { version = "1.47", features = ["fs", "io-util", "net", "rt-multi-thread", "sync"] }
|
||||
url = "2.5.5"
|
||||
rcgen = { version = "0.14.7", default-features = false, features = ["ring"] }
|
||||
tokio-rustls = { version = "0.26.4", default-features = false, features = ["logging", "ring", "tls12"] }
|
||||
tokio = { version = "1.49", features = ["fs", "io-util", "net", "rt-multi-thread", "sync"] }
|
||||
url = "2.5.8"
|
||||
|
||||
[dev-dependencies]
|
||||
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)?;
|
||||
|
||||
// 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
|
||||
let mut cert_file = File::create(certs_path.join(format!(
|
||||
"{}/{}",
|
||||
domain,
|
||||
certificates::CERT_FILE_NAME
|
||||
)))?;
|
||||
let mut cert_file = File::create(cert_dir.join(certificates::CERT_FILE_NAME))?;
|
||||
cert_file.write_all(cert.der())?;
|
||||
|
||||
// write key data to disk
|
||||
let key_file_path =
|
||||
certs_path.join(format!("{}/{}", domain, certificates::KEY_FILE_NAME));
|
||||
let key_file_path = cert_dir.join(certificates::KEY_FILE_NAME);
|
||||
let mut key_file = File::create(&key_file_path)?;
|
||||
#[cfg(unix)]
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue