├── .earthlyignore ├── .envrc ├── .github └── workflows │ └── check.yaml ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── Configuration.md ├── Earthfile ├── LICENSE ├── README.md ├── build.rs ├── default.css ├── docker-compose.yaml ├── flake.lock ├── flake.nix ├── justfile ├── rustfmt.toml └── src ├── html.rs ├── main.rs ├── response.rs ├── response └── configuration.rs └── url.rs /.earthlyignore: -------------------------------------------------------------------------------- 1 | ** 2 | 3 | !.git/ 4 | !src/ 5 | !build.rs 6 | !Cargo.* 7 | !default.css 8 | 9 | -------------------------------------------------------------------------------- /.envrc: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if type -P lorri &>/dev/null; then 4 | eval "$(lorri direnv)" 5 | else 6 | echo 'while direnv evaluated .envrc, could not find the command "lorri" [https://github.com/nix-community/lorri]' 7 | 8 | use nix 9 | fi 10 | 11 | -------------------------------------------------------------------------------- /.github/workflows/check.yaml: -------------------------------------------------------------------------------- 1 | name: Check ✅ 2 | on: 3 | workflow_dispatch: 4 | push: 5 | paths: 6 | - "*" 7 | pull_request: 8 | paths: 9 | - "*" 10 | env: 11 | CARGO_TERM_COLOR: always 12 | jobs: 13 | check: 14 | name: Check ✅ 15 | runs-on: ubuntu-latest 16 | steps: 17 | - name: Checkout 🛒 18 | uses: actions/checkout@v3 19 | - name: Toolchain 🧰 20 | uses: actions-rs/toolchain@v1 21 | with: 22 | profile: minimal 23 | toolchain: 1.78.0 24 | components: rustfmt, clippy 25 | override: true 26 | - name: Check ✅ 27 | uses: actions-rs/cargo@v1 28 | continue-on-error: false 29 | with: 30 | command: check 31 | args: --verbose 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Rust 2 | target 3 | **/*.rs.bk 4 | 5 | # CLion 6 | .idea 7 | 8 | # Development 9 | .env 10 | .secret 11 | 12 | # Fleet 13 | .cargo 14 | fleet.toml 15 | 16 | # Visual Studio Code 17 | .vscode 18 | 19 | # Nix 20 | result* 21 | 22 | # macOS 23 | .DS_Store 24 | 25 | # Fuwn/justfiles 26 | *.just 27 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "actix-codec" 7 | version = "0.5.1" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "617a8268e3537fe1d8c9ead925fca49ef6400927ee7bc26750e90ecee14ce4b8" 10 | dependencies = [ 11 | "bitflags 1.3.2", 12 | "bytes", 13 | "futures-core", 14 | "futures-sink", 15 | "memchr", 16 | "pin-project-lite", 17 | "tokio", 18 | "tokio-util", 19 | "tracing", 20 | ] 21 | 22 | [[package]] 23 | name = "actix-http" 24 | version = "3.7.0" 25 | source = "registry+https://github.com/rust-lang/crates.io-index" 26 | checksum = "4eb9843d84c775696c37d9a418bbb01b932629d01870722c0f13eb3f95e2536d" 27 | dependencies = [ 28 | "actix-codec", 29 | "actix-rt", 30 | "actix-service", 31 | "actix-utils", 32 | "ahash", 33 | "base64", 34 | "bitflags 2.5.0", 35 | "brotli", 36 | "bytes", 37 | "bytestring", 38 | "derive_more", 39 | "encoding_rs", 40 | "flate2", 41 | "futures-core", 42 | "h2", 43 | "http", 44 | "httparse", 45 | "httpdate", 46 | "itoa", 47 | "language-tags", 48 | "local-channel", 49 | "mime", 50 | "percent-encoding", 51 | "pin-project-lite", 52 | "rand", 53 | "sha1", 54 | "smallvec", 55 | "tokio", 56 | "tokio-util", 57 | "tracing", 58 | "zstd", 59 | ] 60 | 61 | [[package]] 62 | name = "actix-macros" 63 | version = "0.2.3" 64 | source = "registry+https://github.com/rust-lang/crates.io-index" 65 | checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6" 66 | dependencies = [ 67 | "quote", 68 | "syn 1.0.109", 69 | ] 70 | 71 | [[package]] 72 | name = "actix-router" 73 | version = "0.5.3" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" 76 | dependencies = [ 77 | "bytestring", 78 | "cfg-if", 79 | "http", 80 | "regex", 81 | "regex-lite", 82 | "serde", 83 | "tracing", 84 | ] 85 | 86 | [[package]] 87 | name = "actix-rt" 88 | version = "2.8.0" 89 | source = "registry+https://github.com/rust-lang/crates.io-index" 90 | checksum = "15265b6b8e2347670eb363c47fc8c75208b4a4994b27192f345fcbe707804f3e" 91 | dependencies = [ 92 | "futures-core", 93 | "tokio", 94 | ] 95 | 96 | [[package]] 97 | name = "actix-server" 98 | version = "2.2.0" 99 | source = "registry+https://github.com/rust-lang/crates.io-index" 100 | checksum = "3e8613a75dd50cc45f473cee3c34d59ed677c0f7b44480ce3b8247d7dc519327" 101 | dependencies = [ 102 | "actix-rt", 103 | "actix-service", 104 | "actix-utils", 105 | "futures-core", 106 | "futures-util", 107 | "mio", 108 | "num_cpus", 109 | "socket2 0.4.9", 110 | "tokio", 111 | "tracing", 112 | ] 113 | 114 | [[package]] 115 | name = "actix-service" 116 | version = "2.0.2" 117 | source = "registry+https://github.com/rust-lang/crates.io-index" 118 | checksum = "3b894941f818cfdc7ccc4b9e60fa7e53b5042a2e8567270f9147d5591893373a" 119 | dependencies = [ 120 | "futures-core", 121 | "paste", 122 | "pin-project-lite", 123 | ] 124 | 125 | [[package]] 126 | name = "actix-utils" 127 | version = "3.0.1" 128 | source = "registry+https://github.com/rust-lang/crates.io-index" 129 | checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" 130 | dependencies = [ 131 | "local-waker", 132 | "pin-project-lite", 133 | ] 134 | 135 | [[package]] 136 | name = "actix-web" 137 | version = "4.9.0" 138 | source = "registry+https://github.com/rust-lang/crates.io-index" 139 | checksum = "9180d76e5cc7ccbc4d60a506f2c727730b154010262df5b910eb17dbe4b8cb38" 140 | dependencies = [ 141 | "actix-codec", 142 | "actix-http", 143 | "actix-macros", 144 | "actix-router", 145 | "actix-rt", 146 | "actix-server", 147 | "actix-service", 148 | "actix-utils", 149 | "actix-web-codegen", 150 | "ahash", 151 | "bytes", 152 | "bytestring", 153 | "cfg-if", 154 | "cookie", 155 | "derive_more", 156 | "encoding_rs", 157 | "futures-core", 158 | "futures-util", 159 | "impl-more", 160 | "itoa", 161 | "language-tags", 162 | "log", 163 | "mime", 164 | "once_cell", 165 | "pin-project-lite", 166 | "regex", 167 | "regex-lite", 168 | "serde", 169 | "serde_json", 170 | "serde_urlencoded", 171 | "smallvec", 172 | "socket2 0.5.7", 173 | "time", 174 | "url", 175 | ] 176 | 177 | [[package]] 178 | name = "actix-web-codegen" 179 | version = "4.3.0" 180 | source = "registry+https://github.com/rust-lang/crates.io-index" 181 | checksum = "f591380e2e68490b5dfaf1dd1aa0ebe78d84ba7067078512b4ea6e4492d622b8" 182 | dependencies = [ 183 | "actix-router", 184 | "proc-macro2", 185 | "quote", 186 | "syn 2.0.66", 187 | ] 188 | 189 | [[package]] 190 | name = "adler" 191 | version = "1.0.2" 192 | source = "registry+https://github.com/rust-lang/crates.io-index" 193 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 194 | 195 | [[package]] 196 | name = "ahash" 197 | version = "0.8.11" 198 | source = "registry+https://github.com/rust-lang/crates.io-index" 199 | checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" 200 | dependencies = [ 201 | "cfg-if", 202 | "getrandom", 203 | "once_cell", 204 | "version_check", 205 | "zerocopy", 206 | ] 207 | 208 | [[package]] 209 | name = "aho-corasick" 210 | version = "1.0.1" 211 | source = "registry+https://github.com/rust-lang/crates.io-index" 212 | checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" 213 | dependencies = [ 214 | "memchr", 215 | ] 216 | 217 | [[package]] 218 | name = "alloc-no-stdlib" 219 | version = "2.0.4" 220 | source = "registry+https://github.com/rust-lang/crates.io-index" 221 | checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" 222 | 223 | [[package]] 224 | name = "alloc-stdlib" 225 | version = "0.2.2" 226 | source = "registry+https://github.com/rust-lang/crates.io-index" 227 | checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" 228 | dependencies = [ 229 | "alloc-no-stdlib", 230 | ] 231 | 232 | [[package]] 233 | name = "allocator-api2" 234 | version = "0.2.18" 235 | source = "registry+https://github.com/rust-lang/crates.io-index" 236 | checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" 237 | 238 | [[package]] 239 | name = "anstream" 240 | version = "0.6.14" 241 | source = "registry+https://github.com/rust-lang/crates.io-index" 242 | checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" 243 | dependencies = [ 244 | "anstyle", 245 | "anstyle-parse", 246 | "anstyle-query", 247 | "anstyle-wincon", 248 | "colorchoice", 249 | "is_terminal_polyfill", 250 | "utf8parse", 251 | ] 252 | 253 | [[package]] 254 | name = "anstyle" 255 | version = "1.0.7" 256 | source = "registry+https://github.com/rust-lang/crates.io-index" 257 | checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" 258 | 259 | [[package]] 260 | name = "anstyle-parse" 261 | version = "0.2.4" 262 | source = "registry+https://github.com/rust-lang/crates.io-index" 263 | checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" 264 | dependencies = [ 265 | "utf8parse", 266 | ] 267 | 268 | [[package]] 269 | name = "anstyle-query" 270 | version = "1.1.0" 271 | source = "registry+https://github.com/rust-lang/crates.io-index" 272 | checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" 273 | dependencies = [ 274 | "windows-sys 0.52.0", 275 | ] 276 | 277 | [[package]] 278 | name = "anstyle-wincon" 279 | version = "3.0.3" 280 | source = "registry+https://github.com/rust-lang/crates.io-index" 281 | checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" 282 | dependencies = [ 283 | "anstyle", 284 | "windows-sys 0.52.0", 285 | ] 286 | 287 | [[package]] 288 | name = "anyhow" 289 | version = "1.0.92" 290 | source = "registry+https://github.com/rust-lang/crates.io-index" 291 | checksum = "74f37166d7d48a0284b99dd824694c26119c700b53bf0d1540cdb147dbdaaf13" 292 | 293 | [[package]] 294 | name = "arc-swap" 295 | version = "1.6.0" 296 | source = "registry+https://github.com/rust-lang/crates.io-index" 297 | checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" 298 | 299 | [[package]] 300 | name = "autocfg" 301 | version = "1.1.0" 302 | source = "registry+https://github.com/rust-lang/crates.io-index" 303 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 304 | 305 | [[package]] 306 | name = "base64" 307 | version = "0.22.1" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" 310 | 311 | [[package]] 312 | name = "bincode" 313 | version = "1.3.3" 314 | source = "registry+https://github.com/rust-lang/crates.io-index" 315 | checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" 316 | dependencies = [ 317 | "serde", 318 | ] 319 | 320 | [[package]] 321 | name = "bit-set" 322 | version = "0.5.3" 323 | source = "registry+https://github.com/rust-lang/crates.io-index" 324 | checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" 325 | dependencies = [ 326 | "bit-vec", 327 | ] 328 | 329 | [[package]] 330 | name = "bit-vec" 331 | version = "0.6.3" 332 | source = "registry+https://github.com/rust-lang/crates.io-index" 333 | checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" 334 | 335 | [[package]] 336 | name = "bitflags" 337 | version = "1.3.2" 338 | source = "registry+https://github.com/rust-lang/crates.io-index" 339 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 340 | 341 | [[package]] 342 | name = "bitflags" 343 | version = "2.5.0" 344 | source = "registry+https://github.com/rust-lang/crates.io-index" 345 | checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" 346 | 347 | [[package]] 348 | name = "block-buffer" 349 | version = "0.10.4" 350 | source = "registry+https://github.com/rust-lang/crates.io-index" 351 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 352 | dependencies = [ 353 | "generic-array", 354 | ] 355 | 356 | [[package]] 357 | name = "brotli" 358 | version = "6.0.0" 359 | source = "registry+https://github.com/rust-lang/crates.io-index" 360 | checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" 361 | dependencies = [ 362 | "alloc-no-stdlib", 363 | "alloc-stdlib", 364 | "brotli-decompressor", 365 | ] 366 | 367 | [[package]] 368 | name = "brotli-decompressor" 369 | version = "4.0.1" 370 | source = "registry+https://github.com/rust-lang/crates.io-index" 371 | checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" 372 | dependencies = [ 373 | "alloc-no-stdlib", 374 | "alloc-stdlib", 375 | ] 376 | 377 | [[package]] 378 | name = "bstr" 379 | version = "1.5.0" 380 | source = "registry+https://github.com/rust-lang/crates.io-index" 381 | checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" 382 | dependencies = [ 383 | "memchr", 384 | "once_cell", 385 | "regex-automata", 386 | "serde", 387 | ] 388 | 389 | [[package]] 390 | name = "bumpalo" 391 | version = "3.12.2" 392 | source = "registry+https://github.com/rust-lang/crates.io-index" 393 | checksum = "3c6ed94e98ecff0c12dd1b04c15ec0d7d9458ca8fe806cea6f12954efe74c63b" 394 | 395 | [[package]] 396 | name = "bytes" 397 | version = "1.4.0" 398 | source = "registry+https://github.com/rust-lang/crates.io-index" 399 | checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" 400 | 401 | [[package]] 402 | name = "bytestring" 403 | version = "1.3.0" 404 | source = "registry+https://github.com/rust-lang/crates.io-index" 405 | checksum = "238e4886760d98c4f899360c834fa93e62cf7f721ac3c2da375cbdf4b8679aae" 406 | dependencies = [ 407 | "bytes", 408 | ] 409 | 410 | [[package]] 411 | name = "caseless" 412 | version = "0.2.1" 413 | source = "registry+https://github.com/rust-lang/crates.io-index" 414 | checksum = "808dab3318747be122cb31d36de18d4d1c81277a76f8332a02b81a3d73463d7f" 415 | dependencies = [ 416 | "regex", 417 | "unicode-normalization", 418 | ] 419 | 420 | [[package]] 421 | name = "cc" 422 | version = "1.0.79" 423 | source = "registry+https://github.com/rust-lang/crates.io-index" 424 | checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" 425 | dependencies = [ 426 | "jobserver", 427 | ] 428 | 429 | [[package]] 430 | name = "cfg-if" 431 | version = "1.0.0" 432 | source = "registry+https://github.com/rust-lang/crates.io-index" 433 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 434 | 435 | [[package]] 436 | name = "clap" 437 | version = "4.5.10" 438 | source = "registry+https://github.com/rust-lang/crates.io-index" 439 | checksum = "8f6b81fb3c84f5563d509c59b5a48d935f689e993afa90fe39047f05adef9142" 440 | dependencies = [ 441 | "clap_builder", 442 | "clap_derive", 443 | ] 444 | 445 | [[package]] 446 | name = "clap_builder" 447 | version = "4.5.10" 448 | source = "registry+https://github.com/rust-lang/crates.io-index" 449 | checksum = "5ca6706fd5224857d9ac5eb9355f6683563cc0541c7cd9d014043b57cbec78ac" 450 | dependencies = [ 451 | "anstream", 452 | "anstyle", 453 | "clap_lex", 454 | "strsim", 455 | "terminal_size", 456 | ] 457 | 458 | [[package]] 459 | name = "clap_derive" 460 | version = "4.5.8" 461 | source = "registry+https://github.com/rust-lang/crates.io-index" 462 | checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" 463 | dependencies = [ 464 | "heck", 465 | "proc-macro2", 466 | "quote", 467 | "syn 2.0.66", 468 | ] 469 | 470 | [[package]] 471 | name = "clap_lex" 472 | version = "0.7.1" 473 | source = "registry+https://github.com/rust-lang/crates.io-index" 474 | checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" 475 | 476 | [[package]] 477 | name = "clru" 478 | version = "0.6.1" 479 | source = "registry+https://github.com/rust-lang/crates.io-index" 480 | checksum = "b8191fa7302e03607ff0e237d4246cc043ff5b3cb9409d995172ba3bea16b807" 481 | 482 | [[package]] 483 | name = "colorchoice" 484 | version = "1.0.1" 485 | source = "registry+https://github.com/rust-lang/crates.io-index" 486 | checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" 487 | 488 | [[package]] 489 | name = "comrak" 490 | version = "0.29.0" 491 | source = "registry+https://github.com/rust-lang/crates.io-index" 492 | checksum = "d8c32ff8b21372fab0e9ecc4e42536055702dc5faa418362bffd1544f9d12637" 493 | dependencies = [ 494 | "caseless", 495 | "clap", 496 | "derive_builder", 497 | "entities", 498 | "memchr", 499 | "once_cell", 500 | "regex", 501 | "shell-words", 502 | "slug", 503 | "syntect", 504 | "typed-arena", 505 | "unicode_categories", 506 | "xdg", 507 | ] 508 | 509 | [[package]] 510 | name = "convert_case" 511 | version = "0.4.0" 512 | source = "registry+https://github.com/rust-lang/crates.io-index" 513 | checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" 514 | 515 | [[package]] 516 | name = "cookie" 517 | version = "0.16.2" 518 | source = "registry+https://github.com/rust-lang/crates.io-index" 519 | checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" 520 | dependencies = [ 521 | "percent-encoding", 522 | "time", 523 | "version_check", 524 | ] 525 | 526 | [[package]] 527 | name = "cpufeatures" 528 | version = "0.2.7" 529 | source = "registry+https://github.com/rust-lang/crates.io-index" 530 | checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" 531 | dependencies = [ 532 | "libc", 533 | ] 534 | 535 | [[package]] 536 | name = "crc32fast" 537 | version = "1.3.2" 538 | source = "registry+https://github.com/rust-lang/crates.io-index" 539 | checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" 540 | dependencies = [ 541 | "cfg-if", 542 | ] 543 | 544 | [[package]] 545 | name = "crypto-common" 546 | version = "0.1.6" 547 | source = "registry+https://github.com/rust-lang/crates.io-index" 548 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 549 | dependencies = [ 550 | "generic-array", 551 | "typenum", 552 | ] 553 | 554 | [[package]] 555 | name = "darling" 556 | version = "0.20.10" 557 | source = "registry+https://github.com/rust-lang/crates.io-index" 558 | checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" 559 | dependencies = [ 560 | "darling_core", 561 | "darling_macro", 562 | ] 563 | 564 | [[package]] 565 | name = "darling_core" 566 | version = "0.20.10" 567 | source = "registry+https://github.com/rust-lang/crates.io-index" 568 | checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" 569 | dependencies = [ 570 | "fnv", 571 | "ident_case", 572 | "proc-macro2", 573 | "quote", 574 | "strsim", 575 | "syn 2.0.66", 576 | ] 577 | 578 | [[package]] 579 | name = "darling_macro" 580 | version = "0.20.10" 581 | source = "registry+https://github.com/rust-lang/crates.io-index" 582 | checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" 583 | dependencies = [ 584 | "darling_core", 585 | "quote", 586 | "syn 2.0.66", 587 | ] 588 | 589 | [[package]] 590 | name = "deranged" 591 | version = "0.3.11" 592 | source = "registry+https://github.com/rust-lang/crates.io-index" 593 | checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" 594 | dependencies = [ 595 | "powerfmt", 596 | ] 597 | 598 | [[package]] 599 | name = "derive_builder" 600 | version = "0.20.0" 601 | source = "registry+https://github.com/rust-lang/crates.io-index" 602 | checksum = "0350b5cb0331628a5916d6c5c0b72e97393b8b6b03b47a9284f4e7f5a405ffd7" 603 | dependencies = [ 604 | "derive_builder_macro", 605 | ] 606 | 607 | [[package]] 608 | name = "derive_builder_core" 609 | version = "0.20.0" 610 | source = "registry+https://github.com/rust-lang/crates.io-index" 611 | checksum = "d48cda787f839151732d396ac69e3473923d54312c070ee21e9effcaa8ca0b1d" 612 | dependencies = [ 613 | "darling", 614 | "proc-macro2", 615 | "quote", 616 | "syn 2.0.66", 617 | ] 618 | 619 | [[package]] 620 | name = "derive_builder_macro" 621 | version = "0.20.0" 622 | source = "registry+https://github.com/rust-lang/crates.io-index" 623 | checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" 624 | dependencies = [ 625 | "derive_builder_core", 626 | "syn 2.0.66", 627 | ] 628 | 629 | [[package]] 630 | name = "derive_more" 631 | version = "0.99.17" 632 | source = "registry+https://github.com/rust-lang/crates.io-index" 633 | checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" 634 | dependencies = [ 635 | "convert_case", 636 | "proc-macro2", 637 | "quote", 638 | "rustc_version", 639 | "syn 1.0.109", 640 | ] 641 | 642 | [[package]] 643 | name = "deunicode" 644 | version = "1.6.0" 645 | source = "registry+https://github.com/rust-lang/crates.io-index" 646 | checksum = "339544cc9e2c4dc3fc7149fd630c5f22263a4fdf18a98afd0075784968b5cf00" 647 | 648 | [[package]] 649 | name = "digest" 650 | version = "0.10.6" 651 | source = "registry+https://github.com/rust-lang/crates.io-index" 652 | checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" 653 | dependencies = [ 654 | "block-buffer", 655 | "crypto-common", 656 | ] 657 | 658 | [[package]] 659 | name = "dotenv" 660 | version = "0.15.0" 661 | source = "registry+https://github.com/rust-lang/crates.io-index" 662 | checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" 663 | 664 | [[package]] 665 | name = "dunce" 666 | version = "1.0.4" 667 | source = "registry+https://github.com/rust-lang/crates.io-index" 668 | checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" 669 | 670 | [[package]] 671 | name = "encoding_rs" 672 | version = "0.8.32" 673 | source = "registry+https://github.com/rust-lang/crates.io-index" 674 | checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" 675 | dependencies = [ 676 | "cfg-if", 677 | ] 678 | 679 | [[package]] 680 | name = "entities" 681 | version = "1.0.1" 682 | source = "registry+https://github.com/rust-lang/crates.io-index" 683 | checksum = "b5320ae4c3782150d900b79807611a59a99fc9a1d61d686faafc24b93fc8d7ca" 684 | 685 | [[package]] 686 | name = "env_logger" 687 | version = "0.10.0" 688 | source = "registry+https://github.com/rust-lang/crates.io-index" 689 | checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" 690 | dependencies = [ 691 | "humantime", 692 | "is-terminal", 693 | "log", 694 | "regex", 695 | "termcolor", 696 | ] 697 | 698 | [[package]] 699 | name = "equivalent" 700 | version = "1.0.1" 701 | source = "registry+https://github.com/rust-lang/crates.io-index" 702 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 703 | 704 | [[package]] 705 | name = "errno" 706 | version = "0.3.9" 707 | source = "registry+https://github.com/rust-lang/crates.io-index" 708 | checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" 709 | dependencies = [ 710 | "libc", 711 | "windows-sys 0.52.0", 712 | ] 713 | 714 | [[package]] 715 | name = "fancy-regex" 716 | version = "0.11.0" 717 | source = "registry+https://github.com/rust-lang/crates.io-index" 718 | checksum = "b95f7c0680e4142284cf8b22c14a476e87d61b004a3a0861872b32ef7ead40a2" 719 | dependencies = [ 720 | "bit-set", 721 | "regex", 722 | ] 723 | 724 | [[package]] 725 | name = "faster-hex" 726 | version = "0.9.0" 727 | source = "registry+https://github.com/rust-lang/crates.io-index" 728 | checksum = "a2a2b11eda1d40935b26cf18f6833c526845ae8c41e58d09af6adeb6f0269183" 729 | 730 | [[package]] 731 | name = "fastrand" 732 | version = "2.1.0" 733 | source = "registry+https://github.com/rust-lang/crates.io-index" 734 | checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" 735 | 736 | [[package]] 737 | name = "filetime" 738 | version = "0.2.21" 739 | source = "registry+https://github.com/rust-lang/crates.io-index" 740 | checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" 741 | dependencies = [ 742 | "cfg-if", 743 | "libc", 744 | "redox_syscall", 745 | "windows-sys 0.48.0", 746 | ] 747 | 748 | [[package]] 749 | name = "flate2" 750 | version = "1.0.26" 751 | source = "registry+https://github.com/rust-lang/crates.io-index" 752 | checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" 753 | dependencies = [ 754 | "crc32fast", 755 | "miniz_oxide", 756 | ] 757 | 758 | [[package]] 759 | name = "fnv" 760 | version = "1.0.7" 761 | source = "registry+https://github.com/rust-lang/crates.io-index" 762 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 763 | 764 | [[package]] 765 | name = "form_urlencoded" 766 | version = "1.2.1" 767 | source = "registry+https://github.com/rust-lang/crates.io-index" 768 | checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 769 | dependencies = [ 770 | "percent-encoding", 771 | ] 772 | 773 | [[package]] 774 | name = "futures-core" 775 | version = "0.3.28" 776 | source = "registry+https://github.com/rust-lang/crates.io-index" 777 | checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" 778 | 779 | [[package]] 780 | name = "futures-sink" 781 | version = "0.3.28" 782 | source = "registry+https://github.com/rust-lang/crates.io-index" 783 | checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" 784 | 785 | [[package]] 786 | name = "futures-task" 787 | version = "0.3.28" 788 | source = "registry+https://github.com/rust-lang/crates.io-index" 789 | checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" 790 | 791 | [[package]] 792 | name = "futures-util" 793 | version = "0.3.28" 794 | source = "registry+https://github.com/rust-lang/crates.io-index" 795 | checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" 796 | dependencies = [ 797 | "futures-core", 798 | "futures-task", 799 | "pin-project-lite", 800 | "pin-utils", 801 | ] 802 | 803 | [[package]] 804 | name = "generic-array" 805 | version = "0.14.7" 806 | source = "registry+https://github.com/rust-lang/crates.io-index" 807 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 808 | dependencies = [ 809 | "typenum", 810 | "version_check", 811 | ] 812 | 813 | [[package]] 814 | name = "germ" 815 | version = "0.4.5" 816 | source = "registry+https://github.com/rust-lang/crates.io-index" 817 | checksum = "b5d74efa222baa305a6f336ff6a4c957bbd2ce8dd3d72f11537e3c9eb6044143" 818 | dependencies = [ 819 | "anyhow", 820 | "rustls", 821 | "tokio", 822 | "tokio-rustls", 823 | "url", 824 | ] 825 | 826 | [[package]] 827 | name = "getrandom" 828 | version = "0.2.9" 829 | source = "registry+https://github.com/rust-lang/crates.io-index" 830 | checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" 831 | dependencies = [ 832 | "cfg-if", 833 | "libc", 834 | "wasi", 835 | ] 836 | 837 | [[package]] 838 | name = "gix" 839 | version = "0.63.0" 840 | source = "registry+https://github.com/rust-lang/crates.io-index" 841 | checksum = "984c5018adfa7a4536ade67990b3ebc6e11ab57b3d6cd9968de0947ca99b4b06" 842 | dependencies = [ 843 | "gix-actor", 844 | "gix-commitgraph", 845 | "gix-config", 846 | "gix-date", 847 | "gix-diff", 848 | "gix-discover", 849 | "gix-features", 850 | "gix-fs", 851 | "gix-glob", 852 | "gix-hash", 853 | "gix-hashtable", 854 | "gix-index", 855 | "gix-lock", 856 | "gix-macros", 857 | "gix-object", 858 | "gix-odb", 859 | "gix-pack", 860 | "gix-path", 861 | "gix-ref", 862 | "gix-refspec", 863 | "gix-revision", 864 | "gix-revwalk", 865 | "gix-sec", 866 | "gix-tempfile", 867 | "gix-trace", 868 | "gix-traverse", 869 | "gix-url", 870 | "gix-utils", 871 | "gix-validate", 872 | "once_cell", 873 | "parking_lot", 874 | "signal-hook", 875 | "smallvec", 876 | "thiserror", 877 | ] 878 | 879 | [[package]] 880 | name = "gix-actor" 881 | version = "0.31.4" 882 | source = "registry+https://github.com/rust-lang/crates.io-index" 883 | checksum = "d9b8ee65074b2bbb91d9d97c15d172ea75043aefebf9869b5b329149dc76501c" 884 | dependencies = [ 885 | "bstr", 886 | "gix-date", 887 | "gix-utils", 888 | "itoa", 889 | "thiserror", 890 | "winnow", 891 | ] 892 | 893 | [[package]] 894 | name = "gix-bitmap" 895 | version = "0.2.11" 896 | source = "registry+https://github.com/rust-lang/crates.io-index" 897 | checksum = "a371db66cbd4e13f0ed9dc4c0fea712d7276805fccc877f77e96374d317e87ae" 898 | dependencies = [ 899 | "thiserror", 900 | ] 901 | 902 | [[package]] 903 | name = "gix-chunk" 904 | version = "0.4.8" 905 | source = "registry+https://github.com/rust-lang/crates.io-index" 906 | checksum = "45c8751169961ba7640b513c3b24af61aa962c967aaf04116734975cd5af0c52" 907 | dependencies = [ 908 | "thiserror", 909 | ] 910 | 911 | [[package]] 912 | name = "gix-commitgraph" 913 | version = "0.24.3" 914 | source = "registry+https://github.com/rust-lang/crates.io-index" 915 | checksum = "133b06f67f565836ec0c473e2116a60fb74f80b6435e21d88013ac0e3c60fc78" 916 | dependencies = [ 917 | "bstr", 918 | "gix-chunk", 919 | "gix-features", 920 | "gix-hash", 921 | "memmap2", 922 | "thiserror", 923 | ] 924 | 925 | [[package]] 926 | name = "gix-config" 927 | version = "0.37.0" 928 | source = "registry+https://github.com/rust-lang/crates.io-index" 929 | checksum = "53fafe42957e11d98e354a66b6bd70aeea00faf2f62dd11164188224a507c840" 930 | dependencies = [ 931 | "bstr", 932 | "gix-config-value", 933 | "gix-features", 934 | "gix-glob", 935 | "gix-path", 936 | "gix-ref", 937 | "gix-sec", 938 | "memchr", 939 | "once_cell", 940 | "smallvec", 941 | "thiserror", 942 | "unicode-bom", 943 | "winnow", 944 | ] 945 | 946 | [[package]] 947 | name = "gix-config-value" 948 | version = "0.14.6" 949 | source = "registry+https://github.com/rust-lang/crates.io-index" 950 | checksum = "fbd06203b1a9b33a78c88252a625031b094d9e1b647260070c25b09910c0a804" 951 | dependencies = [ 952 | "bitflags 2.5.0", 953 | "bstr", 954 | "gix-path", 955 | "libc", 956 | "thiserror", 957 | ] 958 | 959 | [[package]] 960 | name = "gix-date" 961 | version = "0.8.6" 962 | source = "registry+https://github.com/rust-lang/crates.io-index" 963 | checksum = "367ee9093b0c2b04fd04c5c7c8b6a1082713534eab537597ae343663a518fa99" 964 | dependencies = [ 965 | "bstr", 966 | "itoa", 967 | "thiserror", 968 | "time", 969 | ] 970 | 971 | [[package]] 972 | name = "gix-diff" 973 | version = "0.44.0" 974 | source = "registry+https://github.com/rust-lang/crates.io-index" 975 | checksum = "40b9bd8b2d07b6675a840b56a6c177d322d45fa082672b0dad8f063b25baf0a4" 976 | dependencies = [ 977 | "bstr", 978 | "gix-hash", 979 | "gix-object", 980 | "thiserror", 981 | ] 982 | 983 | [[package]] 984 | name = "gix-discover" 985 | version = "0.32.0" 986 | source = "registry+https://github.com/rust-lang/crates.io-index" 987 | checksum = "fc27c699b63da66b50d50c00668bc0b7e90c3a382ef302865e891559935f3dbf" 988 | dependencies = [ 989 | "bstr", 990 | "dunce", 991 | "gix-fs", 992 | "gix-hash", 993 | "gix-path", 994 | "gix-ref", 995 | "gix-sec", 996 | "thiserror", 997 | ] 998 | 999 | [[package]] 1000 | name = "gix-features" 1001 | version = "0.38.2" 1002 | source = "registry+https://github.com/rust-lang/crates.io-index" 1003 | checksum = "ac7045ac9fe5f9c727f38799d002a7ed3583cd777e3322a7c4b43e3cf437dc69" 1004 | dependencies = [ 1005 | "crc32fast", 1006 | "flate2", 1007 | "gix-hash", 1008 | "gix-trace", 1009 | "gix-utils", 1010 | "libc", 1011 | "once_cell", 1012 | "prodash", 1013 | "sha1_smol", 1014 | "thiserror", 1015 | "walkdir", 1016 | ] 1017 | 1018 | [[package]] 1019 | name = "gix-fs" 1020 | version = "0.11.3" 1021 | source = "registry+https://github.com/rust-lang/crates.io-index" 1022 | checksum = "f2bfe6249cfea6d0c0e0990d5226a4cb36f030444ba9e35e0639275db8f98575" 1023 | dependencies = [ 1024 | "fastrand", 1025 | "gix-features", 1026 | "gix-utils", 1027 | ] 1028 | 1029 | [[package]] 1030 | name = "gix-glob" 1031 | version = "0.16.5" 1032 | source = "registry+https://github.com/rust-lang/crates.io-index" 1033 | checksum = "74908b4bbc0a0a40852737e5d7889f676f081e340d5451a16e5b4c50d592f111" 1034 | dependencies = [ 1035 | "bitflags 2.5.0", 1036 | "bstr", 1037 | "gix-features", 1038 | "gix-path", 1039 | ] 1040 | 1041 | [[package]] 1042 | name = "gix-hash" 1043 | version = "0.14.2" 1044 | source = "registry+https://github.com/rust-lang/crates.io-index" 1045 | checksum = "f93d7df7366121b5018f947a04d37f034717e113dcf9ccd85c34b58e57a74d5e" 1046 | dependencies = [ 1047 | "faster-hex", 1048 | "thiserror", 1049 | ] 1050 | 1051 | [[package]] 1052 | name = "gix-hashtable" 1053 | version = "0.5.2" 1054 | source = "registry+https://github.com/rust-lang/crates.io-index" 1055 | checksum = "7ddf80e16f3c19ac06ce415a38b8591993d3f73aede049cb561becb5b3a8e242" 1056 | dependencies = [ 1057 | "gix-hash", 1058 | "hashbrown", 1059 | "parking_lot", 1060 | ] 1061 | 1062 | [[package]] 1063 | name = "gix-index" 1064 | version = "0.33.0" 1065 | source = "registry+https://github.com/rust-lang/crates.io-index" 1066 | checksum = "2d8c5a5f1c58edcbc5692b174cda2703aba82ed17d7176ff4c1752eb48b1b167" 1067 | dependencies = [ 1068 | "bitflags 2.5.0", 1069 | "bstr", 1070 | "filetime", 1071 | "fnv", 1072 | "gix-bitmap", 1073 | "gix-features", 1074 | "gix-fs", 1075 | "gix-hash", 1076 | "gix-lock", 1077 | "gix-object", 1078 | "gix-traverse", 1079 | "gix-utils", 1080 | "gix-validate", 1081 | "hashbrown", 1082 | "itoa", 1083 | "libc", 1084 | "memmap2", 1085 | "rustix 0.38.34", 1086 | "smallvec", 1087 | "thiserror", 1088 | ] 1089 | 1090 | [[package]] 1091 | name = "gix-lock" 1092 | version = "14.0.0" 1093 | source = "registry+https://github.com/rust-lang/crates.io-index" 1094 | checksum = "e3bc7fe297f1f4614774989c00ec8b1add59571dc9b024b4c00acb7dedd4e19d" 1095 | dependencies = [ 1096 | "gix-tempfile", 1097 | "gix-utils", 1098 | "thiserror", 1099 | ] 1100 | 1101 | [[package]] 1102 | name = "gix-macros" 1103 | version = "0.1.5" 1104 | source = "registry+https://github.com/rust-lang/crates.io-index" 1105 | checksum = "999ce923619f88194171a67fb3e6d613653b8d4d6078b529b15a765da0edcc17" 1106 | dependencies = [ 1107 | "proc-macro2", 1108 | "quote", 1109 | "syn 2.0.66", 1110 | ] 1111 | 1112 | [[package]] 1113 | name = "gix-object" 1114 | version = "0.42.2" 1115 | source = "registry+https://github.com/rust-lang/crates.io-index" 1116 | checksum = "1fe2dc4a41191c680c942e6ebd630c8107005983c4679214fdb1007dcf5ae1df" 1117 | dependencies = [ 1118 | "bstr", 1119 | "gix-actor", 1120 | "gix-date", 1121 | "gix-features", 1122 | "gix-hash", 1123 | "gix-utils", 1124 | "gix-validate", 1125 | "itoa", 1126 | "smallvec", 1127 | "thiserror", 1128 | "winnow", 1129 | ] 1130 | 1131 | [[package]] 1132 | name = "gix-odb" 1133 | version = "0.61.0" 1134 | source = "registry+https://github.com/rust-lang/crates.io-index" 1135 | checksum = "e92b9790e2c919166865d0825b26cc440a387c175bed1b43a2fa99c0e9d45e98" 1136 | dependencies = [ 1137 | "arc-swap", 1138 | "gix-date", 1139 | "gix-features", 1140 | "gix-fs", 1141 | "gix-hash", 1142 | "gix-object", 1143 | "gix-pack", 1144 | "gix-path", 1145 | "gix-quote", 1146 | "parking_lot", 1147 | "tempfile", 1148 | "thiserror", 1149 | ] 1150 | 1151 | [[package]] 1152 | name = "gix-pack" 1153 | version = "0.51.0" 1154 | source = "registry+https://github.com/rust-lang/crates.io-index" 1155 | checksum = "7a8da51212dbff944713edb2141ed7e002eea326b8992070374ce13a6cb610b3" 1156 | dependencies = [ 1157 | "clru", 1158 | "gix-chunk", 1159 | "gix-features", 1160 | "gix-hash", 1161 | "gix-hashtable", 1162 | "gix-object", 1163 | "gix-path", 1164 | "gix-tempfile", 1165 | "memmap2", 1166 | "parking_lot", 1167 | "smallvec", 1168 | "thiserror", 1169 | ] 1170 | 1171 | [[package]] 1172 | name = "gix-path" 1173 | version = "0.10.10" 1174 | source = "registry+https://github.com/rust-lang/crates.io-index" 1175 | checksum = "38d5b8722112fa2fa87135298780bc833b0e9f6c56cc82795d209804b3a03484" 1176 | dependencies = [ 1177 | "bstr", 1178 | "gix-trace", 1179 | "home", 1180 | "once_cell", 1181 | "thiserror", 1182 | ] 1183 | 1184 | [[package]] 1185 | name = "gix-quote" 1186 | version = "0.4.12" 1187 | source = "registry+https://github.com/rust-lang/crates.io-index" 1188 | checksum = "cbff4f9b9ea3fa7a25a70ee62f545143abef624ac6aa5884344e70c8b0a1d9ff" 1189 | dependencies = [ 1190 | "bstr", 1191 | "gix-utils", 1192 | "thiserror", 1193 | ] 1194 | 1195 | [[package]] 1196 | name = "gix-ref" 1197 | version = "0.44.1" 1198 | source = "registry+https://github.com/rust-lang/crates.io-index" 1199 | checksum = "3394a2997e5bc6b22ebc1e1a87b41eeefbcfcff3dbfa7c4bd73cb0ac8f1f3e2e" 1200 | dependencies = [ 1201 | "gix-actor", 1202 | "gix-date", 1203 | "gix-features", 1204 | "gix-fs", 1205 | "gix-hash", 1206 | "gix-lock", 1207 | "gix-object", 1208 | "gix-path", 1209 | "gix-tempfile", 1210 | "gix-utils", 1211 | "gix-validate", 1212 | "memmap2", 1213 | "thiserror", 1214 | "winnow", 1215 | ] 1216 | 1217 | [[package]] 1218 | name = "gix-refspec" 1219 | version = "0.23.0" 1220 | source = "registry+https://github.com/rust-lang/crates.io-index" 1221 | checksum = "dde848865834a54fe4d9b4573f15d0e9a68eaf3d061b42d3ed52b4b8acf880b2" 1222 | dependencies = [ 1223 | "bstr", 1224 | "gix-hash", 1225 | "gix-revision", 1226 | "gix-validate", 1227 | "smallvec", 1228 | "thiserror", 1229 | ] 1230 | 1231 | [[package]] 1232 | name = "gix-revision" 1233 | version = "0.27.1" 1234 | source = "registry+https://github.com/rust-lang/crates.io-index" 1235 | checksum = "63e08f8107ed1f93a83bcfbb4c38084c7cb3f6cd849793f1d5eec235f9b13b2b" 1236 | dependencies = [ 1237 | "bstr", 1238 | "gix-date", 1239 | "gix-hash", 1240 | "gix-hashtable", 1241 | "gix-object", 1242 | "gix-revwalk", 1243 | "gix-trace", 1244 | "thiserror", 1245 | ] 1246 | 1247 | [[package]] 1248 | name = "gix-revwalk" 1249 | version = "0.13.1" 1250 | source = "registry+https://github.com/rust-lang/crates.io-index" 1251 | checksum = "4181db9cfcd6d1d0fd258e91569dbb61f94cb788b441b5294dd7f1167a3e788f" 1252 | dependencies = [ 1253 | "gix-commitgraph", 1254 | "gix-date", 1255 | "gix-hash", 1256 | "gix-hashtable", 1257 | "gix-object", 1258 | "smallvec", 1259 | "thiserror", 1260 | ] 1261 | 1262 | [[package]] 1263 | name = "gix-sec" 1264 | version = "0.10.6" 1265 | source = "registry+https://github.com/rust-lang/crates.io-index" 1266 | checksum = "fddc27984a643b20dd03e97790555804f98cf07404e0e552c0ad8133266a79a1" 1267 | dependencies = [ 1268 | "bitflags 2.5.0", 1269 | "gix-path", 1270 | "libc", 1271 | "windows-sys 0.52.0", 1272 | ] 1273 | 1274 | [[package]] 1275 | name = "gix-tempfile" 1276 | version = "14.0.2" 1277 | source = "registry+https://github.com/rust-lang/crates.io-index" 1278 | checksum = "046b4927969fa816a150a0cda2e62c80016fe11fb3c3184e4dddf4e542f108aa" 1279 | dependencies = [ 1280 | "gix-fs", 1281 | "libc", 1282 | "once_cell", 1283 | "parking_lot", 1284 | "signal-hook", 1285 | "signal-hook-registry", 1286 | "tempfile", 1287 | ] 1288 | 1289 | [[package]] 1290 | name = "gix-trace" 1291 | version = "0.1.9" 1292 | source = "registry+https://github.com/rust-lang/crates.io-index" 1293 | checksum = "f924267408915fddcd558e3f37295cc7d6a3e50f8bd8b606cee0808c3915157e" 1294 | 1295 | [[package]] 1296 | name = "gix-traverse" 1297 | version = "0.39.1" 1298 | source = "registry+https://github.com/rust-lang/crates.io-index" 1299 | checksum = "f20cb69b63eb3e4827939f42c05b7756e3488ef49c25c412a876691d568ee2a0" 1300 | dependencies = [ 1301 | "bitflags 2.5.0", 1302 | "gix-commitgraph", 1303 | "gix-date", 1304 | "gix-hash", 1305 | "gix-hashtable", 1306 | "gix-object", 1307 | "gix-revwalk", 1308 | "smallvec", 1309 | "thiserror", 1310 | ] 1311 | 1312 | [[package]] 1313 | name = "gix-url" 1314 | version = "0.27.5" 1315 | source = "registry+https://github.com/rust-lang/crates.io-index" 1316 | checksum = "fd280c5e84fb22e128ed2a053a0daeacb6379469be6a85e3d518a0636e160c89" 1317 | dependencies = [ 1318 | "bstr", 1319 | "gix-features", 1320 | "gix-path", 1321 | "home", 1322 | "thiserror", 1323 | "url", 1324 | ] 1325 | 1326 | [[package]] 1327 | name = "gix-utils" 1328 | version = "0.1.12" 1329 | source = "registry+https://github.com/rust-lang/crates.io-index" 1330 | checksum = "35192df7fd0fa112263bad8021e2df7167df4cc2a6e6d15892e1e55621d3d4dc" 1331 | dependencies = [ 1332 | "fastrand", 1333 | "unicode-normalization", 1334 | ] 1335 | 1336 | [[package]] 1337 | name = "gix-validate" 1338 | version = "0.8.5" 1339 | source = "registry+https://github.com/rust-lang/crates.io-index" 1340 | checksum = "82c27dd34a49b1addf193c92070bcbf3beaf6e10f16a78544de6372e146a0acf" 1341 | dependencies = [ 1342 | "bstr", 1343 | "thiserror", 1344 | ] 1345 | 1346 | [[package]] 1347 | name = "h2" 1348 | version = "0.3.26" 1349 | source = "registry+https://github.com/rust-lang/crates.io-index" 1350 | checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" 1351 | dependencies = [ 1352 | "bytes", 1353 | "fnv", 1354 | "futures-core", 1355 | "futures-sink", 1356 | "futures-util", 1357 | "http", 1358 | "indexmap", 1359 | "slab", 1360 | "tokio", 1361 | "tokio-util", 1362 | "tracing", 1363 | ] 1364 | 1365 | [[package]] 1366 | name = "hashbrown" 1367 | version = "0.14.5" 1368 | source = "registry+https://github.com/rust-lang/crates.io-index" 1369 | checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" 1370 | dependencies = [ 1371 | "ahash", 1372 | "allocator-api2", 1373 | ] 1374 | 1375 | [[package]] 1376 | name = "heck" 1377 | version = "0.5.0" 1378 | source = "registry+https://github.com/rust-lang/crates.io-index" 1379 | checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 1380 | 1381 | [[package]] 1382 | name = "hermit-abi" 1383 | version = "0.2.6" 1384 | source = "registry+https://github.com/rust-lang/crates.io-index" 1385 | checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" 1386 | dependencies = [ 1387 | "libc", 1388 | ] 1389 | 1390 | [[package]] 1391 | name = "hermit-abi" 1392 | version = "0.3.1" 1393 | source = "registry+https://github.com/rust-lang/crates.io-index" 1394 | checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" 1395 | 1396 | [[package]] 1397 | name = "home" 1398 | version = "0.5.5" 1399 | source = "registry+https://github.com/rust-lang/crates.io-index" 1400 | checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" 1401 | dependencies = [ 1402 | "windows-sys 0.48.0", 1403 | ] 1404 | 1405 | [[package]] 1406 | name = "http" 1407 | version = "0.2.9" 1408 | source = "registry+https://github.com/rust-lang/crates.io-index" 1409 | checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" 1410 | dependencies = [ 1411 | "bytes", 1412 | "fnv", 1413 | "itoa", 1414 | ] 1415 | 1416 | [[package]] 1417 | name = "httparse" 1418 | version = "1.8.0" 1419 | source = "registry+https://github.com/rust-lang/crates.io-index" 1420 | checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" 1421 | 1422 | [[package]] 1423 | name = "httpdate" 1424 | version = "1.0.2" 1425 | source = "registry+https://github.com/rust-lang/crates.io-index" 1426 | checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" 1427 | 1428 | [[package]] 1429 | name = "humantime" 1430 | version = "2.1.0" 1431 | source = "registry+https://github.com/rust-lang/crates.io-index" 1432 | checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" 1433 | 1434 | [[package]] 1435 | name = "ident_case" 1436 | version = "1.0.1" 1437 | source = "registry+https://github.com/rust-lang/crates.io-index" 1438 | checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 1439 | 1440 | [[package]] 1441 | name = "idna" 1442 | version = "0.5.0" 1443 | source = "registry+https://github.com/rust-lang/crates.io-index" 1444 | checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" 1445 | dependencies = [ 1446 | "unicode-bidi", 1447 | "unicode-normalization", 1448 | ] 1449 | 1450 | [[package]] 1451 | name = "impl-more" 1452 | version = "0.1.8" 1453 | source = "registry+https://github.com/rust-lang/crates.io-index" 1454 | checksum = "aae21c3177a27788957044151cc2800043d127acaa460a47ebb9b84dfa2c6aa0" 1455 | 1456 | [[package]] 1457 | name = "indexmap" 1458 | version = "2.2.6" 1459 | source = "registry+https://github.com/rust-lang/crates.io-index" 1460 | checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" 1461 | dependencies = [ 1462 | "equivalent", 1463 | "hashbrown", 1464 | ] 1465 | 1466 | [[package]] 1467 | name = "io-lifetimes" 1468 | version = "1.0.11" 1469 | source = "registry+https://github.com/rust-lang/crates.io-index" 1470 | checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" 1471 | dependencies = [ 1472 | "hermit-abi 0.3.1", 1473 | "libc", 1474 | "windows-sys 0.48.0", 1475 | ] 1476 | 1477 | [[package]] 1478 | name = "is-terminal" 1479 | version = "0.4.7" 1480 | source = "registry+https://github.com/rust-lang/crates.io-index" 1481 | checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" 1482 | dependencies = [ 1483 | "hermit-abi 0.3.1", 1484 | "io-lifetimes", 1485 | "rustix 0.37.19", 1486 | "windows-sys 0.48.0", 1487 | ] 1488 | 1489 | [[package]] 1490 | name = "is_terminal_polyfill" 1491 | version = "1.70.0" 1492 | source = "registry+https://github.com/rust-lang/crates.io-index" 1493 | checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" 1494 | 1495 | [[package]] 1496 | name = "itoa" 1497 | version = "1.0.6" 1498 | source = "registry+https://github.com/rust-lang/crates.io-index" 1499 | checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" 1500 | 1501 | [[package]] 1502 | name = "jobserver" 1503 | version = "0.1.26" 1504 | source = "registry+https://github.com/rust-lang/crates.io-index" 1505 | checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" 1506 | dependencies = [ 1507 | "libc", 1508 | ] 1509 | 1510 | [[package]] 1511 | name = "js-sys" 1512 | version = "0.3.63" 1513 | source = "registry+https://github.com/rust-lang/crates.io-index" 1514 | checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" 1515 | dependencies = [ 1516 | "wasm-bindgen", 1517 | ] 1518 | 1519 | [[package]] 1520 | name = "language-tags" 1521 | version = "0.3.2" 1522 | source = "registry+https://github.com/rust-lang/crates.io-index" 1523 | checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" 1524 | 1525 | [[package]] 1526 | name = "libc" 1527 | version = "0.2.155" 1528 | source = "registry+https://github.com/rust-lang/crates.io-index" 1529 | checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" 1530 | 1531 | [[package]] 1532 | name = "linked-hash-map" 1533 | version = "0.5.6" 1534 | source = "registry+https://github.com/rust-lang/crates.io-index" 1535 | checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" 1536 | 1537 | [[package]] 1538 | name = "linux-raw-sys" 1539 | version = "0.3.8" 1540 | source = "registry+https://github.com/rust-lang/crates.io-index" 1541 | checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" 1542 | 1543 | [[package]] 1544 | name = "linux-raw-sys" 1545 | version = "0.4.14" 1546 | source = "registry+https://github.com/rust-lang/crates.io-index" 1547 | checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" 1548 | 1549 | [[package]] 1550 | name = "local-channel" 1551 | version = "0.1.3" 1552 | source = "registry+https://github.com/rust-lang/crates.io-index" 1553 | checksum = "7f303ec0e94c6c54447f84f3b0ef7af769858a9c4ef56ef2a986d3dcd4c3fc9c" 1554 | dependencies = [ 1555 | "futures-core", 1556 | "futures-sink", 1557 | "futures-util", 1558 | "local-waker", 1559 | ] 1560 | 1561 | [[package]] 1562 | name = "local-waker" 1563 | version = "0.1.3" 1564 | source = "registry+https://github.com/rust-lang/crates.io-index" 1565 | checksum = "e34f76eb3611940e0e7d53a9aaa4e6a3151f69541a282fd0dad5571420c53ff1" 1566 | 1567 | [[package]] 1568 | name = "lock_api" 1569 | version = "0.4.9" 1570 | source = "registry+https://github.com/rust-lang/crates.io-index" 1571 | checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" 1572 | dependencies = [ 1573 | "autocfg", 1574 | "scopeguard", 1575 | ] 1576 | 1577 | [[package]] 1578 | name = "log" 1579 | version = "0.4.22" 1580 | source = "registry+https://github.com/rust-lang/crates.io-index" 1581 | checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" 1582 | 1583 | [[package]] 1584 | name = "memchr" 1585 | version = "2.5.0" 1586 | source = "registry+https://github.com/rust-lang/crates.io-index" 1587 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 1588 | 1589 | [[package]] 1590 | name = "memmap2" 1591 | version = "0.9.4" 1592 | source = "registry+https://github.com/rust-lang/crates.io-index" 1593 | checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" 1594 | dependencies = [ 1595 | "libc", 1596 | ] 1597 | 1598 | [[package]] 1599 | name = "mime" 1600 | version = "0.3.17" 1601 | source = "registry+https://github.com/rust-lang/crates.io-index" 1602 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 1603 | 1604 | [[package]] 1605 | name = "miniz_oxide" 1606 | version = "0.7.1" 1607 | source = "registry+https://github.com/rust-lang/crates.io-index" 1608 | checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" 1609 | dependencies = [ 1610 | "adler", 1611 | ] 1612 | 1613 | [[package]] 1614 | name = "mio" 1615 | version = "0.8.6" 1616 | source = "registry+https://github.com/rust-lang/crates.io-index" 1617 | checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" 1618 | dependencies = [ 1619 | "libc", 1620 | "log", 1621 | "wasi", 1622 | "windows-sys 0.45.0", 1623 | ] 1624 | 1625 | [[package]] 1626 | name = "num-conv" 1627 | version = "0.1.0" 1628 | source = "registry+https://github.com/rust-lang/crates.io-index" 1629 | checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" 1630 | 1631 | [[package]] 1632 | name = "num_cpus" 1633 | version = "1.15.0" 1634 | source = "registry+https://github.com/rust-lang/crates.io-index" 1635 | checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" 1636 | dependencies = [ 1637 | "hermit-abi 0.2.6", 1638 | "libc", 1639 | ] 1640 | 1641 | [[package]] 1642 | name = "num_threads" 1643 | version = "0.1.6" 1644 | source = "registry+https://github.com/rust-lang/crates.io-index" 1645 | checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" 1646 | dependencies = [ 1647 | "libc", 1648 | ] 1649 | 1650 | [[package]] 1651 | name = "once_cell" 1652 | version = "1.19.0" 1653 | source = "registry+https://github.com/rust-lang/crates.io-index" 1654 | checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" 1655 | 1656 | [[package]] 1657 | name = "onig" 1658 | version = "6.4.0" 1659 | source = "registry+https://github.com/rust-lang/crates.io-index" 1660 | checksum = "8c4b31c8722ad9171c6d77d3557db078cab2bd50afcc9d09c8b315c59df8ca4f" 1661 | dependencies = [ 1662 | "bitflags 1.3.2", 1663 | "libc", 1664 | "once_cell", 1665 | "onig_sys", 1666 | ] 1667 | 1668 | [[package]] 1669 | name = "onig_sys" 1670 | version = "69.8.1" 1671 | source = "registry+https://github.com/rust-lang/crates.io-index" 1672 | checksum = "7b829e3d7e9cc74c7e315ee8edb185bf4190da5acde74afd7fc59c35b1f086e7" 1673 | dependencies = [ 1674 | "cc", 1675 | "pkg-config", 1676 | ] 1677 | 1678 | [[package]] 1679 | name = "parking_lot" 1680 | version = "0.12.1" 1681 | source = "registry+https://github.com/rust-lang/crates.io-index" 1682 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 1683 | dependencies = [ 1684 | "lock_api", 1685 | "parking_lot_core", 1686 | ] 1687 | 1688 | [[package]] 1689 | name = "parking_lot_core" 1690 | version = "0.9.7" 1691 | source = "registry+https://github.com/rust-lang/crates.io-index" 1692 | checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" 1693 | dependencies = [ 1694 | "cfg-if", 1695 | "libc", 1696 | "redox_syscall", 1697 | "smallvec", 1698 | "windows-sys 0.45.0", 1699 | ] 1700 | 1701 | [[package]] 1702 | name = "paste" 1703 | version = "1.0.12" 1704 | source = "registry+https://github.com/rust-lang/crates.io-index" 1705 | checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" 1706 | 1707 | [[package]] 1708 | name = "percent-encoding" 1709 | version = "2.3.1" 1710 | source = "registry+https://github.com/rust-lang/crates.io-index" 1711 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 1712 | 1713 | [[package]] 1714 | name = "pin-project-lite" 1715 | version = "0.2.9" 1716 | source = "registry+https://github.com/rust-lang/crates.io-index" 1717 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 1718 | 1719 | [[package]] 1720 | name = "pin-utils" 1721 | version = "0.1.0" 1722 | source = "registry+https://github.com/rust-lang/crates.io-index" 1723 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1724 | 1725 | [[package]] 1726 | name = "pkg-config" 1727 | version = "0.3.27" 1728 | source = "registry+https://github.com/rust-lang/crates.io-index" 1729 | checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" 1730 | 1731 | [[package]] 1732 | name = "plist" 1733 | version = "1.7.0" 1734 | source = "registry+https://github.com/rust-lang/crates.io-index" 1735 | checksum = "42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016" 1736 | dependencies = [ 1737 | "base64", 1738 | "indexmap", 1739 | "quick-xml", 1740 | "serde", 1741 | "time", 1742 | ] 1743 | 1744 | [[package]] 1745 | name = "powerfmt" 1746 | version = "0.2.0" 1747 | source = "registry+https://github.com/rust-lang/crates.io-index" 1748 | checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" 1749 | 1750 | [[package]] 1751 | name = "ppv-lite86" 1752 | version = "0.2.17" 1753 | source = "registry+https://github.com/rust-lang/crates.io-index" 1754 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 1755 | 1756 | [[package]] 1757 | name = "pretty_env_logger" 1758 | version = "0.5.0" 1759 | source = "registry+https://github.com/rust-lang/crates.io-index" 1760 | checksum = "865724d4dbe39d9f3dd3b52b88d859d66bcb2d6a0acfd5ea68a65fb66d4bdc1c" 1761 | dependencies = [ 1762 | "env_logger", 1763 | "log", 1764 | ] 1765 | 1766 | [[package]] 1767 | name = "proc-macro2" 1768 | version = "1.0.85" 1769 | source = "registry+https://github.com/rust-lang/crates.io-index" 1770 | checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" 1771 | dependencies = [ 1772 | "unicode-ident", 1773 | ] 1774 | 1775 | [[package]] 1776 | name = "prodash" 1777 | version = "28.0.0" 1778 | source = "registry+https://github.com/rust-lang/crates.io-index" 1779 | checksum = "744a264d26b88a6a7e37cbad97953fa233b94d585236310bcbc88474b4092d79" 1780 | 1781 | [[package]] 1782 | name = "quick-xml" 1783 | version = "0.32.0" 1784 | source = "registry+https://github.com/rust-lang/crates.io-index" 1785 | checksum = "1d3a6e5838b60e0e8fa7a43f22ade549a37d61f8bdbe636d0d7816191de969c2" 1786 | dependencies = [ 1787 | "memchr", 1788 | ] 1789 | 1790 | [[package]] 1791 | name = "quote" 1792 | version = "1.0.36" 1793 | source = "registry+https://github.com/rust-lang/crates.io-index" 1794 | checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" 1795 | dependencies = [ 1796 | "proc-macro2", 1797 | ] 1798 | 1799 | [[package]] 1800 | name = "rand" 1801 | version = "0.8.5" 1802 | source = "registry+https://github.com/rust-lang/crates.io-index" 1803 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1804 | dependencies = [ 1805 | "libc", 1806 | "rand_chacha", 1807 | "rand_core", 1808 | ] 1809 | 1810 | [[package]] 1811 | name = "rand_chacha" 1812 | version = "0.3.1" 1813 | source = "registry+https://github.com/rust-lang/crates.io-index" 1814 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1815 | dependencies = [ 1816 | "ppv-lite86", 1817 | "rand_core", 1818 | ] 1819 | 1820 | [[package]] 1821 | name = "rand_core" 1822 | version = "0.6.4" 1823 | source = "registry+https://github.com/rust-lang/crates.io-index" 1824 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1825 | dependencies = [ 1826 | "getrandom", 1827 | ] 1828 | 1829 | [[package]] 1830 | name = "redox_syscall" 1831 | version = "0.2.16" 1832 | source = "registry+https://github.com/rust-lang/crates.io-index" 1833 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 1834 | dependencies = [ 1835 | "bitflags 1.3.2", 1836 | ] 1837 | 1838 | [[package]] 1839 | name = "regex" 1840 | version = "1.8.1" 1841 | source = "registry+https://github.com/rust-lang/crates.io-index" 1842 | checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" 1843 | dependencies = [ 1844 | "aho-corasick", 1845 | "memchr", 1846 | "regex-syntax 0.7.1", 1847 | ] 1848 | 1849 | [[package]] 1850 | name = "regex-automata" 1851 | version = "0.1.10" 1852 | source = "registry+https://github.com/rust-lang/crates.io-index" 1853 | checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" 1854 | 1855 | [[package]] 1856 | name = "regex-lite" 1857 | version = "0.1.6" 1858 | source = "registry+https://github.com/rust-lang/crates.io-index" 1859 | checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" 1860 | 1861 | [[package]] 1862 | name = "regex-syntax" 1863 | version = "0.7.1" 1864 | source = "registry+https://github.com/rust-lang/crates.io-index" 1865 | checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" 1866 | 1867 | [[package]] 1868 | name = "regex-syntax" 1869 | version = "0.8.4" 1870 | source = "registry+https://github.com/rust-lang/crates.io-index" 1871 | checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" 1872 | 1873 | [[package]] 1874 | name = "ring" 1875 | version = "0.16.20" 1876 | source = "registry+https://github.com/rust-lang/crates.io-index" 1877 | checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" 1878 | dependencies = [ 1879 | "cc", 1880 | "libc", 1881 | "once_cell", 1882 | "spin", 1883 | "untrusted", 1884 | "web-sys", 1885 | "winapi", 1886 | ] 1887 | 1888 | [[package]] 1889 | name = "rustc_version" 1890 | version = "0.4.0" 1891 | source = "registry+https://github.com/rust-lang/crates.io-index" 1892 | checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" 1893 | dependencies = [ 1894 | "semver", 1895 | ] 1896 | 1897 | [[package]] 1898 | name = "rustix" 1899 | version = "0.37.19" 1900 | source = "registry+https://github.com/rust-lang/crates.io-index" 1901 | checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" 1902 | dependencies = [ 1903 | "bitflags 1.3.2", 1904 | "errno", 1905 | "io-lifetimes", 1906 | "libc", 1907 | "linux-raw-sys 0.3.8", 1908 | "windows-sys 0.48.0", 1909 | ] 1910 | 1911 | [[package]] 1912 | name = "rustix" 1913 | version = "0.38.34" 1914 | source = "registry+https://github.com/rust-lang/crates.io-index" 1915 | checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" 1916 | dependencies = [ 1917 | "bitflags 2.5.0", 1918 | "errno", 1919 | "libc", 1920 | "linux-raw-sys 0.4.14", 1921 | "windows-sys 0.52.0", 1922 | ] 1923 | 1924 | [[package]] 1925 | name = "rustls" 1926 | version = "0.21.1" 1927 | source = "registry+https://github.com/rust-lang/crates.io-index" 1928 | checksum = "c911ba11bc8433e811ce56fde130ccf32f5127cab0e0194e9c68c5a5b671791e" 1929 | dependencies = [ 1930 | "log", 1931 | "ring", 1932 | "rustls-webpki", 1933 | "sct", 1934 | ] 1935 | 1936 | [[package]] 1937 | name = "rustls-webpki" 1938 | version = "0.100.1" 1939 | source = "registry+https://github.com/rust-lang/crates.io-index" 1940 | checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" 1941 | dependencies = [ 1942 | "ring", 1943 | "untrusted", 1944 | ] 1945 | 1946 | [[package]] 1947 | name = "rustversion" 1948 | version = "1.0.17" 1949 | source = "registry+https://github.com/rust-lang/crates.io-index" 1950 | checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" 1951 | 1952 | [[package]] 1953 | name = "ryu" 1954 | version = "1.0.13" 1955 | source = "registry+https://github.com/rust-lang/crates.io-index" 1956 | checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" 1957 | 1958 | [[package]] 1959 | name = "same-file" 1960 | version = "1.0.6" 1961 | source = "registry+https://github.com/rust-lang/crates.io-index" 1962 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 1963 | dependencies = [ 1964 | "winapi-util", 1965 | ] 1966 | 1967 | [[package]] 1968 | name = "scopeguard" 1969 | version = "1.1.0" 1970 | source = "registry+https://github.com/rust-lang/crates.io-index" 1971 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1972 | 1973 | [[package]] 1974 | name = "sct" 1975 | version = "0.7.0" 1976 | source = "registry+https://github.com/rust-lang/crates.io-index" 1977 | checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" 1978 | dependencies = [ 1979 | "ring", 1980 | "untrusted", 1981 | ] 1982 | 1983 | [[package]] 1984 | name = "semver" 1985 | version = "1.0.17" 1986 | source = "registry+https://github.com/rust-lang/crates.io-index" 1987 | checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" 1988 | 1989 | [[package]] 1990 | name = "september" 1991 | version = "0.2.35" 1992 | dependencies = [ 1993 | "actix-web", 1994 | "anyhow", 1995 | "comrak", 1996 | "dotenv", 1997 | "germ", 1998 | "log", 1999 | "pretty_env_logger", 2000 | "url", 2001 | "vergen", 2002 | ] 2003 | 2004 | [[package]] 2005 | name = "serde" 2006 | version = "1.0.203" 2007 | source = "registry+https://github.com/rust-lang/crates.io-index" 2008 | checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" 2009 | dependencies = [ 2010 | "serde_derive", 2011 | ] 2012 | 2013 | [[package]] 2014 | name = "serde_derive" 2015 | version = "1.0.203" 2016 | source = "registry+https://github.com/rust-lang/crates.io-index" 2017 | checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" 2018 | dependencies = [ 2019 | "proc-macro2", 2020 | "quote", 2021 | "syn 2.0.66", 2022 | ] 2023 | 2024 | [[package]] 2025 | name = "serde_json" 2026 | version = "1.0.96" 2027 | source = "registry+https://github.com/rust-lang/crates.io-index" 2028 | checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" 2029 | dependencies = [ 2030 | "itoa", 2031 | "ryu", 2032 | "serde", 2033 | ] 2034 | 2035 | [[package]] 2036 | name = "serde_urlencoded" 2037 | version = "0.7.1" 2038 | source = "registry+https://github.com/rust-lang/crates.io-index" 2039 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 2040 | dependencies = [ 2041 | "form_urlencoded", 2042 | "itoa", 2043 | "ryu", 2044 | "serde", 2045 | ] 2046 | 2047 | [[package]] 2048 | name = "sha1" 2049 | version = "0.10.5" 2050 | source = "registry+https://github.com/rust-lang/crates.io-index" 2051 | checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" 2052 | dependencies = [ 2053 | "cfg-if", 2054 | "cpufeatures", 2055 | "digest", 2056 | ] 2057 | 2058 | [[package]] 2059 | name = "sha1_smol" 2060 | version = "1.0.0" 2061 | source = "registry+https://github.com/rust-lang/crates.io-index" 2062 | checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" 2063 | 2064 | [[package]] 2065 | name = "shell-words" 2066 | version = "1.1.0" 2067 | source = "registry+https://github.com/rust-lang/crates.io-index" 2068 | checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" 2069 | 2070 | [[package]] 2071 | name = "signal-hook" 2072 | version = "0.3.15" 2073 | source = "registry+https://github.com/rust-lang/crates.io-index" 2074 | checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9" 2075 | dependencies = [ 2076 | "libc", 2077 | "signal-hook-registry", 2078 | ] 2079 | 2080 | [[package]] 2081 | name = "signal-hook-registry" 2082 | version = "1.4.1" 2083 | source = "registry+https://github.com/rust-lang/crates.io-index" 2084 | checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" 2085 | dependencies = [ 2086 | "libc", 2087 | ] 2088 | 2089 | [[package]] 2090 | name = "slab" 2091 | version = "0.4.8" 2092 | source = "registry+https://github.com/rust-lang/crates.io-index" 2093 | checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" 2094 | dependencies = [ 2095 | "autocfg", 2096 | ] 2097 | 2098 | [[package]] 2099 | name = "slug" 2100 | version = "0.1.5" 2101 | source = "registry+https://github.com/rust-lang/crates.io-index" 2102 | checksum = "3bd94acec9c8da640005f8e135a39fc0372e74535e6b368b7a04b875f784c8c4" 2103 | dependencies = [ 2104 | "deunicode", 2105 | "wasm-bindgen", 2106 | ] 2107 | 2108 | [[package]] 2109 | name = "smallvec" 2110 | version = "1.13.2" 2111 | source = "registry+https://github.com/rust-lang/crates.io-index" 2112 | checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" 2113 | 2114 | [[package]] 2115 | name = "socket2" 2116 | version = "0.4.9" 2117 | source = "registry+https://github.com/rust-lang/crates.io-index" 2118 | checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" 2119 | dependencies = [ 2120 | "libc", 2121 | "winapi", 2122 | ] 2123 | 2124 | [[package]] 2125 | name = "socket2" 2126 | version = "0.5.7" 2127 | source = "registry+https://github.com/rust-lang/crates.io-index" 2128 | checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" 2129 | dependencies = [ 2130 | "libc", 2131 | "windows-sys 0.52.0", 2132 | ] 2133 | 2134 | [[package]] 2135 | name = "spin" 2136 | version = "0.5.2" 2137 | source = "registry+https://github.com/rust-lang/crates.io-index" 2138 | checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" 2139 | 2140 | [[package]] 2141 | name = "strsim" 2142 | version = "0.11.1" 2143 | source = "registry+https://github.com/rust-lang/crates.io-index" 2144 | checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" 2145 | 2146 | [[package]] 2147 | name = "syn" 2148 | version = "1.0.109" 2149 | source = "registry+https://github.com/rust-lang/crates.io-index" 2150 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 2151 | dependencies = [ 2152 | "proc-macro2", 2153 | "quote", 2154 | "unicode-ident", 2155 | ] 2156 | 2157 | [[package]] 2158 | name = "syn" 2159 | version = "2.0.66" 2160 | source = "registry+https://github.com/rust-lang/crates.io-index" 2161 | checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" 2162 | dependencies = [ 2163 | "proc-macro2", 2164 | "quote", 2165 | "unicode-ident", 2166 | ] 2167 | 2168 | [[package]] 2169 | name = "syntect" 2170 | version = "5.2.0" 2171 | source = "registry+https://github.com/rust-lang/crates.io-index" 2172 | checksum = "874dcfa363995604333cf947ae9f751ca3af4522c60886774c4963943b4746b1" 2173 | dependencies = [ 2174 | "bincode", 2175 | "bitflags 1.3.2", 2176 | "fancy-regex", 2177 | "flate2", 2178 | "fnv", 2179 | "once_cell", 2180 | "onig", 2181 | "plist", 2182 | "regex-syntax 0.8.4", 2183 | "serde", 2184 | "serde_derive", 2185 | "serde_json", 2186 | "thiserror", 2187 | "walkdir", 2188 | "yaml-rust", 2189 | ] 2190 | 2191 | [[package]] 2192 | name = "tempfile" 2193 | version = "3.12.0" 2194 | source = "registry+https://github.com/rust-lang/crates.io-index" 2195 | checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" 2196 | dependencies = [ 2197 | "cfg-if", 2198 | "fastrand", 2199 | "once_cell", 2200 | "rustix 0.38.34", 2201 | "windows-sys 0.59.0", 2202 | ] 2203 | 2204 | [[package]] 2205 | name = "termcolor" 2206 | version = "1.2.0" 2207 | source = "registry+https://github.com/rust-lang/crates.io-index" 2208 | checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" 2209 | dependencies = [ 2210 | "winapi-util", 2211 | ] 2212 | 2213 | [[package]] 2214 | name = "terminal_size" 2215 | version = "0.3.0" 2216 | source = "registry+https://github.com/rust-lang/crates.io-index" 2217 | checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" 2218 | dependencies = [ 2219 | "rustix 0.38.34", 2220 | "windows-sys 0.48.0", 2221 | ] 2222 | 2223 | [[package]] 2224 | name = "thiserror" 2225 | version = "1.0.40" 2226 | source = "registry+https://github.com/rust-lang/crates.io-index" 2227 | checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" 2228 | dependencies = [ 2229 | "thiserror-impl", 2230 | ] 2231 | 2232 | [[package]] 2233 | name = "thiserror-impl" 2234 | version = "1.0.40" 2235 | source = "registry+https://github.com/rust-lang/crates.io-index" 2236 | checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" 2237 | dependencies = [ 2238 | "proc-macro2", 2239 | "quote", 2240 | "syn 2.0.66", 2241 | ] 2242 | 2243 | [[package]] 2244 | name = "time" 2245 | version = "0.3.36" 2246 | source = "registry+https://github.com/rust-lang/crates.io-index" 2247 | checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" 2248 | dependencies = [ 2249 | "deranged", 2250 | "itoa", 2251 | "libc", 2252 | "num-conv", 2253 | "num_threads", 2254 | "powerfmt", 2255 | "serde", 2256 | "time-core", 2257 | "time-macros", 2258 | ] 2259 | 2260 | [[package]] 2261 | name = "time-core" 2262 | version = "0.1.2" 2263 | source = "registry+https://github.com/rust-lang/crates.io-index" 2264 | checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" 2265 | 2266 | [[package]] 2267 | name = "time-macros" 2268 | version = "0.2.18" 2269 | source = "registry+https://github.com/rust-lang/crates.io-index" 2270 | checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" 2271 | dependencies = [ 2272 | "num-conv", 2273 | "time-core", 2274 | ] 2275 | 2276 | [[package]] 2277 | name = "tinyvec" 2278 | version = "1.6.0" 2279 | source = "registry+https://github.com/rust-lang/crates.io-index" 2280 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 2281 | dependencies = [ 2282 | "tinyvec_macros", 2283 | ] 2284 | 2285 | [[package]] 2286 | name = "tinyvec_macros" 2287 | version = "0.1.1" 2288 | source = "registry+https://github.com/rust-lang/crates.io-index" 2289 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 2290 | 2291 | [[package]] 2292 | name = "tokio" 2293 | version = "1.28.1" 2294 | source = "registry+https://github.com/rust-lang/crates.io-index" 2295 | checksum = "0aa32867d44e6f2ce3385e89dceb990188b8bb0fb25b0cf576647a6f98ac5105" 2296 | dependencies = [ 2297 | "autocfg", 2298 | "bytes", 2299 | "libc", 2300 | "mio", 2301 | "num_cpus", 2302 | "parking_lot", 2303 | "pin-project-lite", 2304 | "signal-hook-registry", 2305 | "socket2 0.4.9", 2306 | "tokio-macros", 2307 | "windows-sys 0.48.0", 2308 | ] 2309 | 2310 | [[package]] 2311 | name = "tokio-macros" 2312 | version = "2.1.0" 2313 | source = "registry+https://github.com/rust-lang/crates.io-index" 2314 | checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" 2315 | dependencies = [ 2316 | "proc-macro2", 2317 | "quote", 2318 | "syn 2.0.66", 2319 | ] 2320 | 2321 | [[package]] 2322 | name = "tokio-rustls" 2323 | version = "0.24.1" 2324 | source = "registry+https://github.com/rust-lang/crates.io-index" 2325 | checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" 2326 | dependencies = [ 2327 | "rustls", 2328 | "tokio", 2329 | ] 2330 | 2331 | [[package]] 2332 | name = "tokio-util" 2333 | version = "0.7.8" 2334 | source = "registry+https://github.com/rust-lang/crates.io-index" 2335 | checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" 2336 | dependencies = [ 2337 | "bytes", 2338 | "futures-core", 2339 | "futures-sink", 2340 | "pin-project-lite", 2341 | "tokio", 2342 | "tracing", 2343 | ] 2344 | 2345 | [[package]] 2346 | name = "tracing" 2347 | version = "0.1.37" 2348 | source = "registry+https://github.com/rust-lang/crates.io-index" 2349 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" 2350 | dependencies = [ 2351 | "cfg-if", 2352 | "log", 2353 | "pin-project-lite", 2354 | "tracing-core", 2355 | ] 2356 | 2357 | [[package]] 2358 | name = "tracing-core" 2359 | version = "0.1.31" 2360 | source = "registry+https://github.com/rust-lang/crates.io-index" 2361 | checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" 2362 | dependencies = [ 2363 | "once_cell", 2364 | ] 2365 | 2366 | [[package]] 2367 | name = "typed-arena" 2368 | version = "2.0.2" 2369 | source = "registry+https://github.com/rust-lang/crates.io-index" 2370 | checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" 2371 | 2372 | [[package]] 2373 | name = "typenum" 2374 | version = "1.16.0" 2375 | source = "registry+https://github.com/rust-lang/crates.io-index" 2376 | checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" 2377 | 2378 | [[package]] 2379 | name = "unicode-bidi" 2380 | version = "0.3.17" 2381 | source = "registry+https://github.com/rust-lang/crates.io-index" 2382 | checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" 2383 | 2384 | [[package]] 2385 | name = "unicode-bom" 2386 | version = "2.0.2" 2387 | source = "registry+https://github.com/rust-lang/crates.io-index" 2388 | checksum = "98e90c70c9f0d4d1ee6d0a7d04aa06cb9bbd53d8cfbdd62a0269a7c2eb640552" 2389 | 2390 | [[package]] 2391 | name = "unicode-ident" 2392 | version = "1.0.8" 2393 | source = "registry+https://github.com/rust-lang/crates.io-index" 2394 | checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" 2395 | 2396 | [[package]] 2397 | name = "unicode-normalization" 2398 | version = "0.1.22" 2399 | source = "registry+https://github.com/rust-lang/crates.io-index" 2400 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 2401 | dependencies = [ 2402 | "tinyvec", 2403 | ] 2404 | 2405 | [[package]] 2406 | name = "unicode_categories" 2407 | version = "0.1.1" 2408 | source = "registry+https://github.com/rust-lang/crates.io-index" 2409 | checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" 2410 | 2411 | [[package]] 2412 | name = "untrusted" 2413 | version = "0.7.1" 2414 | source = "registry+https://github.com/rust-lang/crates.io-index" 2415 | checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" 2416 | 2417 | [[package]] 2418 | name = "url" 2419 | version = "2.5.2" 2420 | source = "registry+https://github.com/rust-lang/crates.io-index" 2421 | checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" 2422 | dependencies = [ 2423 | "form_urlencoded", 2424 | "idna", 2425 | "percent-encoding", 2426 | ] 2427 | 2428 | [[package]] 2429 | name = "utf8parse" 2430 | version = "0.2.2" 2431 | source = "registry+https://github.com/rust-lang/crates.io-index" 2432 | checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 2433 | 2434 | [[package]] 2435 | name = "vergen" 2436 | version = "8.3.2" 2437 | source = "registry+https://github.com/rust-lang/crates.io-index" 2438 | checksum = "2990d9ea5967266ea0ccf413a4aa5c42a93dbcfda9cb49a97de6931726b12566" 2439 | dependencies = [ 2440 | "anyhow", 2441 | "cfg-if", 2442 | "gix", 2443 | "rustversion", 2444 | "time", 2445 | ] 2446 | 2447 | [[package]] 2448 | name = "version_check" 2449 | version = "0.9.4" 2450 | source = "registry+https://github.com/rust-lang/crates.io-index" 2451 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 2452 | 2453 | [[package]] 2454 | name = "walkdir" 2455 | version = "2.3.3" 2456 | source = "registry+https://github.com/rust-lang/crates.io-index" 2457 | checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" 2458 | dependencies = [ 2459 | "same-file", 2460 | "winapi-util", 2461 | ] 2462 | 2463 | [[package]] 2464 | name = "wasi" 2465 | version = "0.11.0+wasi-snapshot-preview1" 2466 | source = "registry+https://github.com/rust-lang/crates.io-index" 2467 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2468 | 2469 | [[package]] 2470 | name = "wasm-bindgen" 2471 | version = "0.2.86" 2472 | source = "registry+https://github.com/rust-lang/crates.io-index" 2473 | checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" 2474 | dependencies = [ 2475 | "cfg-if", 2476 | "wasm-bindgen-macro", 2477 | ] 2478 | 2479 | [[package]] 2480 | name = "wasm-bindgen-backend" 2481 | version = "0.2.86" 2482 | source = "registry+https://github.com/rust-lang/crates.io-index" 2483 | checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" 2484 | dependencies = [ 2485 | "bumpalo", 2486 | "log", 2487 | "once_cell", 2488 | "proc-macro2", 2489 | "quote", 2490 | "syn 2.0.66", 2491 | "wasm-bindgen-shared", 2492 | ] 2493 | 2494 | [[package]] 2495 | name = "wasm-bindgen-macro" 2496 | version = "0.2.86" 2497 | source = "registry+https://github.com/rust-lang/crates.io-index" 2498 | checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" 2499 | dependencies = [ 2500 | "quote", 2501 | "wasm-bindgen-macro-support", 2502 | ] 2503 | 2504 | [[package]] 2505 | name = "wasm-bindgen-macro-support" 2506 | version = "0.2.86" 2507 | source = "registry+https://github.com/rust-lang/crates.io-index" 2508 | checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" 2509 | dependencies = [ 2510 | "proc-macro2", 2511 | "quote", 2512 | "syn 2.0.66", 2513 | "wasm-bindgen-backend", 2514 | "wasm-bindgen-shared", 2515 | ] 2516 | 2517 | [[package]] 2518 | name = "wasm-bindgen-shared" 2519 | version = "0.2.86" 2520 | source = "registry+https://github.com/rust-lang/crates.io-index" 2521 | checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" 2522 | 2523 | [[package]] 2524 | name = "web-sys" 2525 | version = "0.3.63" 2526 | source = "registry+https://github.com/rust-lang/crates.io-index" 2527 | checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" 2528 | dependencies = [ 2529 | "js-sys", 2530 | "wasm-bindgen", 2531 | ] 2532 | 2533 | [[package]] 2534 | name = "winapi" 2535 | version = "0.3.9" 2536 | source = "registry+https://github.com/rust-lang/crates.io-index" 2537 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2538 | dependencies = [ 2539 | "winapi-i686-pc-windows-gnu", 2540 | "winapi-x86_64-pc-windows-gnu", 2541 | ] 2542 | 2543 | [[package]] 2544 | name = "winapi-i686-pc-windows-gnu" 2545 | version = "0.4.0" 2546 | source = "registry+https://github.com/rust-lang/crates.io-index" 2547 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2548 | 2549 | [[package]] 2550 | name = "winapi-util" 2551 | version = "0.1.5" 2552 | source = "registry+https://github.com/rust-lang/crates.io-index" 2553 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 2554 | dependencies = [ 2555 | "winapi", 2556 | ] 2557 | 2558 | [[package]] 2559 | name = "winapi-x86_64-pc-windows-gnu" 2560 | version = "0.4.0" 2561 | source = "registry+https://github.com/rust-lang/crates.io-index" 2562 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2563 | 2564 | [[package]] 2565 | name = "windows-sys" 2566 | version = "0.45.0" 2567 | source = "registry+https://github.com/rust-lang/crates.io-index" 2568 | checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" 2569 | dependencies = [ 2570 | "windows-targets 0.42.2", 2571 | ] 2572 | 2573 | [[package]] 2574 | name = "windows-sys" 2575 | version = "0.48.0" 2576 | source = "registry+https://github.com/rust-lang/crates.io-index" 2577 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 2578 | dependencies = [ 2579 | "windows-targets 0.48.0", 2580 | ] 2581 | 2582 | [[package]] 2583 | name = "windows-sys" 2584 | version = "0.52.0" 2585 | source = "registry+https://github.com/rust-lang/crates.io-index" 2586 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 2587 | dependencies = [ 2588 | "windows-targets 0.52.6", 2589 | ] 2590 | 2591 | [[package]] 2592 | name = "windows-sys" 2593 | version = "0.59.0" 2594 | source = "registry+https://github.com/rust-lang/crates.io-index" 2595 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 2596 | dependencies = [ 2597 | "windows-targets 0.52.6", 2598 | ] 2599 | 2600 | [[package]] 2601 | name = "windows-targets" 2602 | version = "0.42.2" 2603 | source = "registry+https://github.com/rust-lang/crates.io-index" 2604 | checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" 2605 | dependencies = [ 2606 | "windows_aarch64_gnullvm 0.42.2", 2607 | "windows_aarch64_msvc 0.42.2", 2608 | "windows_i686_gnu 0.42.2", 2609 | "windows_i686_msvc 0.42.2", 2610 | "windows_x86_64_gnu 0.42.2", 2611 | "windows_x86_64_gnullvm 0.42.2", 2612 | "windows_x86_64_msvc 0.42.2", 2613 | ] 2614 | 2615 | [[package]] 2616 | name = "windows-targets" 2617 | version = "0.48.0" 2618 | source = "registry+https://github.com/rust-lang/crates.io-index" 2619 | checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" 2620 | dependencies = [ 2621 | "windows_aarch64_gnullvm 0.48.0", 2622 | "windows_aarch64_msvc 0.48.0", 2623 | "windows_i686_gnu 0.48.0", 2624 | "windows_i686_msvc 0.48.0", 2625 | "windows_x86_64_gnu 0.48.0", 2626 | "windows_x86_64_gnullvm 0.48.0", 2627 | "windows_x86_64_msvc 0.48.0", 2628 | ] 2629 | 2630 | [[package]] 2631 | name = "windows-targets" 2632 | version = "0.52.6" 2633 | source = "registry+https://github.com/rust-lang/crates.io-index" 2634 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 2635 | dependencies = [ 2636 | "windows_aarch64_gnullvm 0.52.6", 2637 | "windows_aarch64_msvc 0.52.6", 2638 | "windows_i686_gnu 0.52.6", 2639 | "windows_i686_gnullvm", 2640 | "windows_i686_msvc 0.52.6", 2641 | "windows_x86_64_gnu 0.52.6", 2642 | "windows_x86_64_gnullvm 0.52.6", 2643 | "windows_x86_64_msvc 0.52.6", 2644 | ] 2645 | 2646 | [[package]] 2647 | name = "windows_aarch64_gnullvm" 2648 | version = "0.42.2" 2649 | source = "registry+https://github.com/rust-lang/crates.io-index" 2650 | checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" 2651 | 2652 | [[package]] 2653 | name = "windows_aarch64_gnullvm" 2654 | version = "0.48.0" 2655 | source = "registry+https://github.com/rust-lang/crates.io-index" 2656 | checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" 2657 | 2658 | [[package]] 2659 | name = "windows_aarch64_gnullvm" 2660 | version = "0.52.6" 2661 | source = "registry+https://github.com/rust-lang/crates.io-index" 2662 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 2663 | 2664 | [[package]] 2665 | name = "windows_aarch64_msvc" 2666 | version = "0.42.2" 2667 | source = "registry+https://github.com/rust-lang/crates.io-index" 2668 | checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" 2669 | 2670 | [[package]] 2671 | name = "windows_aarch64_msvc" 2672 | version = "0.48.0" 2673 | source = "registry+https://github.com/rust-lang/crates.io-index" 2674 | checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" 2675 | 2676 | [[package]] 2677 | name = "windows_aarch64_msvc" 2678 | version = "0.52.6" 2679 | source = "registry+https://github.com/rust-lang/crates.io-index" 2680 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 2681 | 2682 | [[package]] 2683 | name = "windows_i686_gnu" 2684 | version = "0.42.2" 2685 | source = "registry+https://github.com/rust-lang/crates.io-index" 2686 | checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" 2687 | 2688 | [[package]] 2689 | name = "windows_i686_gnu" 2690 | version = "0.48.0" 2691 | source = "registry+https://github.com/rust-lang/crates.io-index" 2692 | checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" 2693 | 2694 | [[package]] 2695 | name = "windows_i686_gnu" 2696 | version = "0.52.6" 2697 | source = "registry+https://github.com/rust-lang/crates.io-index" 2698 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 2699 | 2700 | [[package]] 2701 | name = "windows_i686_gnullvm" 2702 | version = "0.52.6" 2703 | source = "registry+https://github.com/rust-lang/crates.io-index" 2704 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 2705 | 2706 | [[package]] 2707 | name = "windows_i686_msvc" 2708 | version = "0.42.2" 2709 | source = "registry+https://github.com/rust-lang/crates.io-index" 2710 | checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" 2711 | 2712 | [[package]] 2713 | name = "windows_i686_msvc" 2714 | version = "0.48.0" 2715 | source = "registry+https://github.com/rust-lang/crates.io-index" 2716 | checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" 2717 | 2718 | [[package]] 2719 | name = "windows_i686_msvc" 2720 | version = "0.52.6" 2721 | source = "registry+https://github.com/rust-lang/crates.io-index" 2722 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 2723 | 2724 | [[package]] 2725 | name = "windows_x86_64_gnu" 2726 | version = "0.42.2" 2727 | source = "registry+https://github.com/rust-lang/crates.io-index" 2728 | checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" 2729 | 2730 | [[package]] 2731 | name = "windows_x86_64_gnu" 2732 | version = "0.48.0" 2733 | source = "registry+https://github.com/rust-lang/crates.io-index" 2734 | checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" 2735 | 2736 | [[package]] 2737 | name = "windows_x86_64_gnu" 2738 | version = "0.52.6" 2739 | source = "registry+https://github.com/rust-lang/crates.io-index" 2740 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 2741 | 2742 | [[package]] 2743 | name = "windows_x86_64_gnullvm" 2744 | version = "0.42.2" 2745 | source = "registry+https://github.com/rust-lang/crates.io-index" 2746 | checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" 2747 | 2748 | [[package]] 2749 | name = "windows_x86_64_gnullvm" 2750 | version = "0.48.0" 2751 | source = "registry+https://github.com/rust-lang/crates.io-index" 2752 | checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" 2753 | 2754 | [[package]] 2755 | name = "windows_x86_64_gnullvm" 2756 | version = "0.52.6" 2757 | source = "registry+https://github.com/rust-lang/crates.io-index" 2758 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 2759 | 2760 | [[package]] 2761 | name = "windows_x86_64_msvc" 2762 | version = "0.42.2" 2763 | source = "registry+https://github.com/rust-lang/crates.io-index" 2764 | checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" 2765 | 2766 | [[package]] 2767 | name = "windows_x86_64_msvc" 2768 | version = "0.48.0" 2769 | source = "registry+https://github.com/rust-lang/crates.io-index" 2770 | checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" 2771 | 2772 | [[package]] 2773 | name = "windows_x86_64_msvc" 2774 | version = "0.52.6" 2775 | source = "registry+https://github.com/rust-lang/crates.io-index" 2776 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 2777 | 2778 | [[package]] 2779 | name = "winnow" 2780 | version = "0.6.20" 2781 | source = "registry+https://github.com/rust-lang/crates.io-index" 2782 | checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" 2783 | dependencies = [ 2784 | "memchr", 2785 | ] 2786 | 2787 | [[package]] 2788 | name = "xdg" 2789 | version = "2.5.2" 2790 | source = "registry+https://github.com/rust-lang/crates.io-index" 2791 | checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" 2792 | 2793 | [[package]] 2794 | name = "yaml-rust" 2795 | version = "0.4.5" 2796 | source = "registry+https://github.com/rust-lang/crates.io-index" 2797 | checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" 2798 | dependencies = [ 2799 | "linked-hash-map", 2800 | ] 2801 | 2802 | [[package]] 2803 | name = "zerocopy" 2804 | version = "0.7.35" 2805 | source = "registry+https://github.com/rust-lang/crates.io-index" 2806 | checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" 2807 | dependencies = [ 2808 | "zerocopy-derive", 2809 | ] 2810 | 2811 | [[package]] 2812 | name = "zerocopy-derive" 2813 | version = "0.7.35" 2814 | source = "registry+https://github.com/rust-lang/crates.io-index" 2815 | checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" 2816 | dependencies = [ 2817 | "proc-macro2", 2818 | "quote", 2819 | "syn 2.0.66", 2820 | ] 2821 | 2822 | [[package]] 2823 | name = "zstd" 2824 | version = "0.13.1" 2825 | source = "registry+https://github.com/rust-lang/crates.io-index" 2826 | checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" 2827 | dependencies = [ 2828 | "zstd-safe", 2829 | ] 2830 | 2831 | [[package]] 2832 | name = "zstd-safe" 2833 | version = "7.1.0" 2834 | source = "registry+https://github.com/rust-lang/crates.io-index" 2835 | checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" 2836 | dependencies = [ 2837 | "zstd-sys", 2838 | ] 2839 | 2840 | [[package]] 2841 | name = "zstd-sys" 2842 | version = "2.0.10+zstd.1.5.6" 2843 | source = "registry+https://github.com/rust-lang/crates.io-index" 2844 | checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" 2845 | dependencies = [ 2846 | "cc", 2847 | "pkg-config", 2848 | ] 2849 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 2 | 3 | [package] 4 | name = "september" 5 | version = "0.2.35" 6 | authors = ["Fuwn "] 7 | edition = "2021" 8 | description = "A simple and efficient Gemini-to-HTTP proxy." 9 | readme = "README.md" 10 | homepage = "https://github.com/gemrest/september" 11 | repository = "https://github.com/gemrest/september" 12 | license = "GPL-3.0-only" 13 | keywords = ["rust", "gemini", "proxy"] 14 | categories = ["web-programming", "web-programming::http-server"] 15 | rust-version = "1.78.0" 16 | 17 | # Slower builds, faster executables 18 | [profile.release] 19 | lto = "fat" 20 | codegen-units = 1 21 | opt-level = 3 22 | 23 | [dependencies] 24 | # Gemini 25 | germ = { version = "0.4.5", features = ["ast", "meta"] } 26 | 27 | # HTTP 28 | actix-web = "4.9.0" 29 | 30 | # Logging 31 | pretty_env_logger = "0.5.0" 32 | log = "0.4.22" 33 | 34 | # Environment Variables 35 | dotenv = "0.15.0" 36 | 37 | # URL Standard 38 | url = "2.5.2" 39 | 40 | # Markdown Encoding 41 | comrak = "0.29.0" 42 | 43 | [build-dependencies] 44 | # Compile-time Environment Variables 45 | vergen = { version = "8.3.2", features = ["git", "gitoxide"] } 46 | 47 | # `Result` 48 | anyhow = "1.0.92" 49 | -------------------------------------------------------------------------------- /Configuration.md: -------------------------------------------------------------------------------- 1 | # Configuration 2 | 3 | Configuration for September is done entirely through environment variables. 4 | 5 | ## `PORT` 6 | 7 | Bind September to a custom port 8 | 9 | Generally, you shouldn't touch this option if you are deploying using Docker. 10 | 11 | If no `PORT` is provided or the `PORT` could not be properly parsed as an 12 | unsigned 16-bit integer, `PORT` will default to `80`. 13 | 14 | ```dotenv 15 | PORT=1337 16 | ``` 17 | 18 | ## `ROOT` 19 | 20 | Root Gemini capsule to proxy when not visiting a "/proxy" route 21 | 22 | If no `ROOT` is provided, `ROOT` will default to `"gemini://fuwn.me"`. 23 | 24 | ```dotenv 25 | ROOT=gemini://fuwn.me 26 | ``` 27 | 28 | ## `CSS_EXTERNAL` 29 | 30 | A comma-separated list of external CSS files to apply to the HTML response 31 | 32 | If no `CSS_EXTERNAL` value is provided, a default stylesheet of 33 | [LaTeX.css](https://latex.vercel.app/) and the styles within 34 | [`default.css`](./default.css) will be applied. 35 | 36 | ```dotenv 37 | CSS_EXTERNAL=https://cdnjs.cloudflare.com/ajax/libs/mini.css/3.0.1/mini-default.min.css 38 | ``` 39 | 40 | ## `KEEP_GEMINI_EXACT` 41 | 42 | A comma-separated list of Gemini URIs to keep as is when proxying. 43 | 44 | ```dotenv 45 | # These two URIs will be kept pointing to their original Gemini URIs when 46 | # proxied instead of being replaced with their proxied equivalents. 47 | KEEP_GEMINI_EXACT=gemini://fuwn.me/something,gemini://fuwn.me/another 48 | ``` 49 | 50 | ## `HEAD` 51 | 52 | Insert any string at the end of the HTMl `` 53 | 54 | ```dotenv 55 | HEAD= 56 | ``` 57 | 58 | ## `KEEP_GEMINI_DOMAIN` 59 | 60 | Similar to `KEEP_GEMINI_EXACT`, except matches based on entire domain or domains 61 | instead of exact URIs 62 | 63 | ```dotenv 64 | KEEP_GEMINI_DOMAIN=fuwn.me,example.com 65 | ``` 66 | 67 | ## `PROXY_BY_DEFAULT` 68 | 69 | Control whether or not all Gemini URLs will be proxied 70 | 71 | Similar to `KEEP_GEMINI_EXACT` and `KEEP_GEMINI_DOMAIN`, but global 72 | 73 | This configuration value defaults to `true`. 74 | 75 | ```dotenv 76 | PROXY_BY_DEFAULT=false 77 | ``` 78 | 79 | ## `FAVICON_EXTERNAL` 80 | 81 | An external favicon file to apply to the HTML response 82 | 83 | ```dotenv 84 | FAVICON_EXTERNAL=https://example.com/favicon.ico 85 | ``` 86 | 87 | ## `PLAIN_TEXT_ROUTE` 88 | 89 | A comma-separated list of paths to treat as plain text routes 90 | 91 | These patterns do not support regular expressions, but do support the use of `*` 92 | as a wildcard. 93 | 94 | ```dotenv 95 | PLAIN_TEXT_ROUTE=/robots.txt,/license.txt,*.xml 96 | ``` 97 | 98 | ## `MATHJAX` 99 | 100 | Enable MathJax support for rendering LaTeX within `$` and `$$` delimiters 101 | 102 | This configuration value defaults to `false`. 103 | 104 | ```dotenv 105 | MATHJAX=true 106 | ``` 107 | 108 | ## `HEADER` 109 | 110 | Adds a large text header to the top of a proxy page 111 | 112 | Only available in styled routes 113 | 114 | ```dotenv 115 | HEADER="This string will show up at the top of my proxied capsule." 116 | ``` 117 | 118 | ## `EMBED_IMAGES` 119 | 120 | Embed images in the HTML response if a link to an image is found 121 | 122 | A value of `1` will enable this feature, while keeping link to the image. 123 | 124 | Any non-empty value other than `1` will enable this feature, while removing the link to the image. 125 | 126 | ```dotenv 127 | EMBED_IMAGES=2 128 | ``` 129 | 130 | ## `CONDENSE_LINKS` 131 | 132 | Condense adjacent links to a single line 133 | 134 | A value of `*` will condense all adjacent links to a single line. 135 | 136 | A comma-separated list of paths will condense adjacent links to a single line only on those paths. 137 | 138 | ### Example 139 | 140 | ```plaintext 141 | 142 | 143 |

Link

144 |

Link

145 |

Link

146 | 147 | 148 |

Link | Link | Link

149 | ``` 150 | 151 | ## `PRIMARY_COLOUR` 152 | 153 | Set the primary colour of elements in the default stylesheet. This field 154 | controls the colour of items such as links and highlights. 155 | 156 | Popular choices are `var(--base0D)` for a blue, or `var(--base09)` for an 157 | amber colour. 158 | 159 | ### Examples 160 | 161 | ```plaintext 162 | PRIMARY_COLOUR=var(--base09) 163 | PRIMARY_COLOUR=red 164 | PRIMARY_COLOUR=#ff0000 165 | ``` 166 | 167 | ## `CONDENSE_LINKS_AT_HEADING` 168 | 169 | This configuration option is similar to `CONDENSE_LINKS`, but only condenses 170 | links found under certain headings. 171 | 172 | For instance, I condense the few links I have on my index page under the 173 | "# Fuwn[.me]" heading, and I condense my quick links/navigation panel under the 174 | "## Quick Links" heading. 175 | 176 | This way, I don't accidentally condense say my entire sitemap, which could be 177 | hundreds of links long, but I do condense my quick links on every page. 178 | 179 | ```dotenv 180 | CONDENSE_LINKS_AT_HEADINGS="## Quick Links,# Fuwn[.me]" 181 | ``` 182 | -------------------------------------------------------------------------------- /Earthfile: -------------------------------------------------------------------------------- 1 | VERSION 0.7 2 | 3 | image: 4 | ARG tag=latest 5 | 6 | FROM scratch 7 | 8 | COPY +build/september . 9 | 10 | EXPOSE 80 11 | 12 | CMD ["./september"] 13 | 14 | SAVE IMAGE --push fuwn/september:$tag 15 | 16 | build: 17 | FROM messense/rust-musl-cross:x86_64-musl 18 | 19 | WORKDIR /source 20 | 21 | RUN cargo new september 22 | 23 | WORKDIR /source/september 24 | 25 | COPY Cargo.* . 26 | 27 | RUN --mount=type=cache,target=/usr/local/cargo/registry cargo build --release 28 | 29 | COPY .git .git 30 | COPY src src 31 | COPY build.rs build.rs 32 | COPY Cargo.* . 33 | COPY default.css . 34 | 35 | RUN --mount=type=cache,target=/usr/local/cargo/registry cargo build --release 36 | RUN strip -s /source/september/target/x86_64-unknown-linux-musl/release/september 37 | RUN mv /source/september/target/x86_64-unknown-linux-musl/release/september . 38 | 39 | SAVE ARTIFACT /source/september/september 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # September 2 | 3 | [![github.com](https://github.com/gemrest/september/actions/workflows/check.yaml/badge.svg?branch=main)](https://github.com/gemrest/september/actions/workflows/check.yaml) 4 | 5 | September is a simple and efficient Gemini-to-HTTP proxy written in [Rust](https://www.rust-lang.org/). 6 | 7 | September remains simple, but packs more features than you could imagine, all configurable via environment variables. 8 | 9 | ## Usage 10 | 11 | A production deployment of September can be found at , with the root capsule set as [gemini://fuwn.me](gemini://fuwn.me). 12 | 13 | You can try proxying any external capsule through the `/proxy/` route: . 14 | 15 | ### Docker 16 | 17 | `docker run` allows you to pass environment variables via the `-e` flag. 18 | 19 | ```shell 20 | # September with a custom root, listening on port 8080 21 | docker run -d \ 22 | -e ROOT="gemini://fuwn.me" \ 23 | -p 8080:80 \ 24 | fuwn/september:latest 25 | 26 | # September with a custom root, port, and external stylesheet, listening on port 80 27 | docker run -d \ 28 | -e ROOT="gemini://fuwn.me" \ 29 | -e PORT="8080" \ 30 | -e CSS_EXTERNAL="https://example.com/style.css" \ 31 | -p 80:80 \ 32 | fuwn/september:latest 33 | ``` 34 | 35 | You may start to find this way of passing configuration cumbersome for many options, so a Docker management tool like [Portainer](https://www.portainer.io/) or a Docker Compose file might come in handy. 36 | 37 | ### Docker Compose 38 | 39 | Docker Compose is a file-configurable Docker utility to make deploying exact container configuration and configuration sets simple. This repository provides a sample Docker Compose file, [`./docker-compose.yaml`](./docker-compose.yaml), with some examples configuration values that you can modify to your liking. 40 | 41 | After editing the file, you can bring up the composition using `docker-compose` command. 42 | 43 | ```shell 44 | docker-compose up -d 45 | ``` 46 | 47 | ### Executable 48 | 49 | While generally discouraged, you can run the September executable by itself and configure it through environment variables. 50 | 51 | ```shell 52 | ROOT="gemini://fuwn.me" PORT="8080" CSS_EXTERNAL="https://example.com/style.css" ./september 53 | ``` 54 | 55 | If available, September will use the relative directory's `.env` file for populating its configuration. Here is an example `.env` file with a few values added. 56 | 57 | ```dotenv 58 | # .env 59 | 60 | ROOT=gemini://fuwn.me 61 | PORT=8080 62 | CSS_EXTERNAL=https://example.com/style.css 63 | HEAD= 64 | ``` 65 | 66 | ## Configuration 67 | 68 | All configuration options with examples can be found in the [Configuration.md](./Configuration.md) file. Regardless of deployment method, these options remain present in each case. 69 | 70 | ## Styling 71 | 72 | Want to give your website a shiny new look? Try using one of these sources to find a stylish and **minimal** (!!) CSS theme/ framework! 73 | 74 | - [dohliam/dropin-minimal-css](https://github.com/dohliam/dropin-minimal-css): Drop-in switcher for previewing minimal CSS frameworks 75 | - [dbohdan/classless-css](https://github.com/dbohdan/classless-css): A list of classless CSS themes/frameworks with screenshots 76 | 77 | ## Origins 78 | 79 | The story of September starts with a simple request to add environment variable-configurable options to a pre-existing Gemini proxy. 80 | 81 | The proxy in question already had options, just that they were command-line flag configurable options. Apparently, containerising a networked application is not a "valid use-case", and everyone should prefer running raw binaries on their systems and servers. Also, finicky command-line arguments reign superior to the industry standard environment variable, or at least that's what I gather from this author's response to adding a few extra lines of code that I already wrote out for environment variable support. 82 | 83 | Anyway, I forked the proxy. Somewhere down the line, I realised that this proxy just isn't cutting it and was poorly designed to begin with, so I threw it in the figurative trash, and wrote September from scratch. 84 | 85 | In the end, it all worked out, since September has become the easiest to configure, most feature-packed, quickest to understand (and quickest in general) Gemini-to-HTTP proxy of the bunch. 86 | 87 | ## License 88 | 89 | This project is licensed with the [GNU General Public License v3.0](./LICENSE). 90 | -------------------------------------------------------------------------------- /build.rs: -------------------------------------------------------------------------------- 1 | fn main() -> Result<(), Box> { 2 | vergen::EmitBuilder::builder().git_sha(true).emit()?; 3 | 4 | Ok(()) 5 | } 6 | -------------------------------------------------------------------------------- /default.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --bg: var(--base00); 3 | --off-bg: var(--base01); 4 | --inner-bg: var(--base02); 5 | --fg: var(--base04); 6 | --off-fg: var(--base04); 7 | --muted: var(--base03); 8 | --link: var(--primary); 9 | --hover: var(--base0E); 10 | --highlight: var(--primary); 11 | --logo: var(--primary); 12 | --font-monospace: "Fira Mono", monospace; 13 | --font-size: 13.5px; 14 | } 15 | 16 | body { 17 | background-color: var(--bg); 18 | color: var(--fg); 19 | font-family: var(--font-monospace); 20 | font-size: var(--font-size); 21 | line-height: 1rem; 22 | } 23 | 24 | h1, 25 | h2, 26 | h3, 27 | h4, 28 | h5, 29 | h6 { 30 | font-size: var(--font-size); 31 | margin: 1.5rem 0 0 0; 32 | font-weight: 600; 33 | } 34 | 35 | h1 + h2, 36 | h1 + h3, 37 | h1 + h4, 38 | h1 + h5, 39 | h1 + h6, 40 | h2 + h3, 41 | h2 + h4, 42 | h2 + h5, 43 | h2 + h6, 44 | h3 + h4, 45 | h3 + h5, 46 | h3 + h6, 47 | h4 + h5, 48 | h4 + h6, 49 | h5 + h6 { 50 | margin: 0; 51 | } 52 | 53 | h1:before { 54 | content: "# "; 55 | } 56 | 57 | h2:before { 58 | content: "## "; 59 | } 60 | 61 | h3:before { 62 | content: "### "; 63 | } 64 | 65 | h4:before { 66 | content: "#### "; 67 | } 68 | 69 | h5:before { 70 | content: "##### "; 71 | } 72 | 73 | h6:before { 74 | content: "###### "; 75 | } 76 | 77 | h1:before, 78 | h2:before, 79 | h3:before, 80 | h4:before, 81 | h5:before, 82 | h6:before { 83 | color: var(--muted); 84 | font-weight: 400; 85 | } 86 | 87 | h1:first-child { 88 | margin-top: 0; 89 | } 90 | 91 | p { 92 | margin: 0 0 1.5rem 0; 93 | } 94 | 95 | a:link, 96 | a:visited { 97 | color: var(--link); 98 | text-decoration: none; 99 | } 100 | 101 | a:hover, 102 | a:active, 103 | a.active { 104 | background-color: var(--link); 105 | color: var(--bg); 106 | } 107 | 108 | ul { 109 | margin: 0 0 1.5rem 0; 110 | padding-left: 1.25rem; 111 | } 112 | 113 | ol { 114 | margin: 0 0 1.5rem 0; 115 | padding-left: 1.75rem; 116 | } 117 | 118 | ul ul, 119 | ul ol, 120 | ol ul, 121 | ol ol { 122 | margin: 0; 123 | } 124 | 125 | ul li::marker { 126 | content: "∗\00A0"; 127 | color: var(--muted); 128 | } 129 | 130 | ol li::marker { 131 | color: var(--muted); 132 | } 133 | 134 | dt { 135 | margin: 0; 136 | font-weight: bold; 137 | } 138 | 139 | dd { 140 | margin: 0 0 0 1.5rem; 141 | font-style: italic; 142 | } 143 | 144 | dd + dt { 145 | margin-top: 1.5rem; 146 | } 147 | 148 | dl { 149 | margin: 0 0 1.5rem 0; 150 | } 151 | 152 | blockquote { 153 | position: relative; 154 | margin: 0 0 1.5rem 1.5rem; 155 | } 156 | 157 | blockquote::before { 158 | position: absolute; 159 | left: -1.5rem; 160 | content: ">"; 161 | color: var(--muted); 162 | } 163 | 164 | pre, 165 | code, 166 | kbd, 167 | samp { 168 | background: var(--inner-bg) !important; 169 | font-family: var(--font-monospace); 170 | color: var(--off-fg); 171 | } 172 | 173 | pre { 174 | overflow-x: auto; 175 | padding: 1.5rem; 176 | margin: 0 0 1.5rem 0; 177 | } 178 | 179 | b, 180 | strong { 181 | font-weight: 600; 182 | } 183 | 184 | ::selection, 185 | mark { 186 | background-color: var(--highlight); 187 | color: var(--bg); 188 | } 189 | 190 | hr { 191 | border: 0; 192 | margin-bottom: 1.5rem; 193 | } 194 | 195 | hr:after { 196 | content: "---"; 197 | color: var(--muted); 198 | } 199 | 200 | sup, 201 | sub { 202 | vertical-align: baseline; 203 | position: relative; 204 | top: -0.25rem; 205 | font-size: unset; 206 | } 207 | 208 | sub { 209 | top: 0.25rem; 210 | } 211 | 212 | table { 213 | border-spacing: 0; 214 | margin: 0 0 1.5rem 0; 215 | overflow-wrap: anywhere; 216 | } 217 | 218 | th, 219 | td { 220 | padding: 0 0.75rem; 221 | vertical-align: top; 222 | } 223 | 224 | th:first-child, 225 | td:first-child { 226 | padding-left: 0; 227 | } 228 | 229 | th { 230 | text-align: inherit; 231 | } 232 | 233 | img { 234 | max-width: 100%; 235 | height: auto; 236 | } 237 | 238 | :root { 239 | --base00: #f8f8f8; 240 | --base001: #ffffff; 241 | --base0011: #ffffff80; 242 | --base01: #e8e8e8; 243 | --base02: #d8d8d8; 244 | --base03: #b8b8b8; 245 | --base04: #585858; 246 | --base05: #383838; 247 | --base06: #282828; 248 | --base07: #181818; 249 | --base08: #ab4642; 250 | --base09: #dc9656; 251 | --base0A: #f7ca88; 252 | --base0B: #a1b56c; 253 | --base0C: #86c1b9; 254 | --base0D: #7cafc2; 255 | --base0E: #ba8baf; 256 | --base0F: #a16946; 257 | } 258 | 259 | @media (prefers-color-scheme: dark) { 260 | :root { 261 | --base00: #080808; 262 | --base001: #0c0c0c; 263 | --base0011: #0c0c0c80; 264 | --base01: #181818; 265 | --base02: #282828; 266 | --base03: #484848; 267 | --base04: #a8a8a8; 268 | --base05: #c8c8c8; 269 | --base06: #d8d8d8; 270 | --base07: #f8f8f8; 271 | --base08: #9a4541; 272 | --base09: #cb9555; 273 | --base0A: #f6c987; 274 | --base0B: #a0b45b; 275 | --base0C: #85c0b8; 276 | --base0D: #7baeb1; 277 | --base0E: #b98aae; 278 | --base0F: #a06845; 279 | } 280 | } 281 | 282 | .gemini-fragment { 283 | -webkit-touch-callout: none; 284 | -webkit-user-select: none; 285 | -khtml-user-select: none; 286 | -moz-user-select: none; 287 | -ms-user-select: none; 288 | user-select: none; 289 | color: var(--muted); 290 | } 291 | 292 | /* * { 293 | transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, 294 | border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; 295 | } */ 296 | -------------------------------------------------------------------------------- /docker-compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | september: 3 | ports: 4 | - "8080:80" 5 | environment: 6 | - "ROOT=gemini://fuwn.me" 7 | - "CSS_EXTERNAL=https://example.com/style.css" 8 | - "KEEP_GEMINI_EXACT=gemini://fuwn.me/skills" 9 | # - "KEEP_GEMINI_DOMAIN=fuwn.me" 10 | - "PROXY_BY_DEFAULT=true" 11 | image: "fuwn/september:latest" 12 | -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "crane": { 4 | "locked": { 5 | "lastModified": 1727316705, 6 | "narHash": "sha256-/mumx8AQ5xFuCJqxCIOFCHTVlxHkMT21idpbgbm/TIE=", 7 | "owner": "ipetkov", 8 | "repo": "crane", 9 | "rev": "5b03654ce046b5167e7b0bccbd8244cb56c16f0e", 10 | "type": "github" 11 | }, 12 | "original": { 13 | "owner": "ipetkov", 14 | "repo": "crane", 15 | "type": "github" 16 | } 17 | }, 18 | "flake-utils": { 19 | "inputs": { 20 | "systems": [ 21 | "systems" 22 | ] 23 | }, 24 | "locked": { 25 | "lastModified": 1710146030, 26 | "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", 27 | "owner": "numtide", 28 | "repo": "flake-utils", 29 | "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", 30 | "type": "github" 31 | }, 32 | "original": { 33 | "owner": "numtide", 34 | "repo": "flake-utils", 35 | "type": "github" 36 | } 37 | }, 38 | "nixpkgs": { 39 | "locked": { 40 | "lastModified": 1726206720, 41 | "narHash": "sha256-tI7141IHDABMNgz4iXDo8agCp0SeTLbaIZ2DRndwcmk=", 42 | "owner": "NixOS", 43 | "repo": "nixpkgs", 44 | "rev": "673d99f1406cb09b8eb6feab4743ebdf70046557", 45 | "type": "github" 46 | }, 47 | "original": { 48 | "owner": "NixOS", 49 | "ref": "nixpkgs-unstable", 50 | "repo": "nixpkgs", 51 | "type": "github" 52 | } 53 | }, 54 | "root": { 55 | "inputs": { 56 | "crane": "crane", 57 | "flake-utils": "flake-utils", 58 | "nixpkgs": "nixpkgs", 59 | "rust-overlay": "rust-overlay", 60 | "systems": "systems" 61 | } 62 | }, 63 | "rust-overlay": { 64 | "inputs": { 65 | "nixpkgs": [ 66 | "nixpkgs" 67 | ] 68 | }, 69 | "locked": { 70 | "lastModified": 1726280639, 71 | "narHash": "sha256-YfLRPlFZWrT2oRLNAoqf7G3+NnUTDdlIJk6tmBU7kXM=", 72 | "owner": "oxalica", 73 | "repo": "rust-overlay", 74 | "rev": "e9f8641c92f26fd1e076e705edb12147c384171d", 75 | "type": "github" 76 | }, 77 | "original": { 78 | "owner": "oxalica", 79 | "repo": "rust-overlay", 80 | "type": "github" 81 | } 82 | }, 83 | "systems": { 84 | "locked": { 85 | "lastModified": 1681028828, 86 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 87 | "owner": "nix-systems", 88 | "repo": "default", 89 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 90 | "type": "github" 91 | }, 92 | "original": { 93 | "owner": "nix-systems", 94 | "repo": "default", 95 | "type": "github" 96 | } 97 | } 98 | }, 99 | "root": "root", 100 | "version": 7 101 | } 102 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "Simple & Efficient Gemini-to-HTTP Proxy"; 3 | 4 | inputs = { 5 | crane.url = "github:ipetkov/crane"; 6 | nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 7 | systems.url = "github:nix-systems/default"; 8 | 9 | flake-utils = { 10 | url = "github:numtide/flake-utils"; 11 | inputs.systems.follows = "systems"; 12 | }; 13 | 14 | rust-overlay = { 15 | url = "github:oxalica/rust-overlay"; 16 | inputs.nixpkgs.follows = "nixpkgs"; 17 | }; 18 | }; 19 | 20 | outputs = 21 | { 22 | crane, 23 | flake-utils, 24 | nixpkgs, 25 | rust-overlay, 26 | self, 27 | ... 28 | }: 29 | flake-utils.lib.eachDefaultSystem ( 30 | system: 31 | let 32 | pkgs = import nixpkgs { 33 | inherit system; 34 | 35 | overlays = [ (import rust-overlay) ]; 36 | }; 37 | 38 | craneLib = crane.mkLib pkgs; 39 | 40 | meta = with pkgs.lib; { 41 | homepage = "https://github.com/gemrest/september"; 42 | description = "Simple & Efficient Gemini-to-HTTP Proxy"; 43 | license = licenses.gpl3Only; 44 | maintainers = [ maintainers.Fuwn ]; 45 | mainPackage = "september"; 46 | platforms = platforms.linux; 47 | }; 48 | 49 | september = craneLib.buildPackage { 50 | inherit meta; 51 | 52 | strictDeps = true; 53 | 54 | src = pkgs.lib.cleanSourceWith { 55 | src = ./.; 56 | 57 | filter = 58 | path: type: 59 | builtins.match ".*css$" path != null 60 | || builtins.match ".*\\.git.*" path != null 61 | || (craneLib.filterCargoSources path type); 62 | }; 63 | }; 64 | in 65 | { 66 | packages = { 67 | inherit september; 68 | 69 | default = self.packages.${system}.september; 70 | }; 71 | 72 | apps = { 73 | september = { 74 | inherit meta; 75 | 76 | type = "app"; 77 | program = "${self.packages.${system}.september}/bin/september"; 78 | }; 79 | 80 | default = self.apps.${system}.september; 81 | }; 82 | 83 | devShells.default = 84 | with pkgs; 85 | mkShell.override 86 | { 87 | stdenv = stdenvAdapters.useMoldLinker clangStdenv; 88 | } 89 | { 90 | RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; 91 | 92 | buildInputs = [ 93 | cargo-make 94 | openssl 95 | pkg-config 96 | cargo-watch 97 | 98 | (lib.hiPrio ( 99 | rust-bin.stable.latest.minimal.override { 100 | extensions = [ "rust-docs" ]; 101 | } 102 | )) 103 | 104 | (rust-bin.selectLatestNightlyWith ( 105 | toolchain: 106 | toolchain.minimal.override { 107 | extensions = [ "rustfmt" ]; 108 | } 109 | )) 110 | ]; 111 | }; 112 | } 113 | ); 114 | } 115 | -------------------------------------------------------------------------------- /justfile: -------------------------------------------------------------------------------- 1 | import? 'cargo.just' 2 | 3 | default: 4 | @just --list 5 | 6 | fetch: 7 | curl https://raw.githubusercontent.com/Fuwn/justfiles/refs/heads/main/cargo.just > cargo.just 8 | -------------------------------------------------------------------------------- /rustfmt.toml: -------------------------------------------------------------------------------- 1 | edition = "2021" 2 | enum_discrim_align_threshold = 40 3 | # error_on_line_overflow = true 4 | # error_on_unformatted = true 5 | fn_single_line = true 6 | format_code_in_doc_comments = true 7 | format_macro_matchers = true 8 | format_strings = true 9 | inline_attribute_width = 80 10 | match_arm_blocks = false 11 | max_width = 80 12 | imports_granularity = "One" 13 | newline_style = "Unix" 14 | normalize_doc_attributes = true 15 | overflow_delimited_expr = true 16 | reorder_impl_items = true 17 | group_imports = "StdExternalCrate" 18 | struct_field_align_threshold = 40 19 | tab_spaces = 2 20 | use_field_init_shorthand = true 21 | use_small_heuristics = "Max" 22 | use_try_shorthand = true 23 | version = "Two" 24 | wrap_comments = true 25 | 26 | -------------------------------------------------------------------------------- /src/html.rs: -------------------------------------------------------------------------------- 1 | use {germ::ast::Node, std::env::var, std::fmt::Write, url::Url}; 2 | 3 | fn link_from_host_href(url: &Url, href: &str) -> Option { 4 | Some(format!( 5 | "gemini://{}{}{}", 6 | url.domain()?, 7 | { if href.starts_with('/') { "" } else { "/" } }, 8 | href 9 | )) 10 | } 11 | 12 | fn safe(text: &str) -> String { 13 | let is_ordered_list = text.starts_with(|c: char| c.is_ascii_digit()) 14 | && text.get(1..3) == Some(". "); 15 | 16 | if is_ordered_list { 17 | text.to_string() 18 | } else { 19 | comrak::markdown_to_html(text, &comrak::ComrakOptions::default()) 20 | .replace("

", "") 21 | .replace("

", "") 22 | } 23 | } 24 | 25 | #[allow(clippy::too_many_lines, clippy::cognitive_complexity)] 26 | pub fn from_gemini( 27 | response: &germ::request::Response, 28 | url: &Url, 29 | configuration: &crate::response::configuration::Configuration, 30 | ) -> Option<(String, String)> { 31 | const GEMINI_FRAGMENT: &str = 32 | r#"=> "#; 33 | let ast_tree = germ::ast::Ast::from_string( 34 | response.content().as_ref().map_or_else(String::default, String::clone), 35 | ); 36 | let ast = ast_tree.inner(); 37 | let mut html = String::new(); 38 | let mut title = String::new(); 39 | let mut previous_link = false; 40 | let mut previous_link_count = 0; 41 | let condense_links = { 42 | let links = var("CONDENSE_LINKS").map_or_else( 43 | |_| vec![], 44 | |condense_links| { 45 | condense_links 46 | .split(',') 47 | .map(std::string::ToString::to_string) 48 | .collect() 49 | }, 50 | ); 51 | 52 | links.contains(&url.path().to_string()) || links.contains(&"*".to_string()) 53 | }; 54 | let condensible_headings_value = 55 | var("CONDENSE_LINKS_AT_HEADINGS").unwrap_or_default(); 56 | let condensible_headings = if condensible_headings_value.is_empty() { 57 | vec![] 58 | } else { 59 | condensible_headings_value.split(',').collect::>() 60 | }; 61 | let mut in_condense_links_flag_trap = !condensible_headings.is_empty(); 62 | 63 | for node in ast { 64 | if condensible_headings.contains(&node.to_gemtext().as_str()) { 65 | in_condense_links_flag_trap = true; 66 | } 67 | 68 | let align_adjacent_links = |html: &str| { 69 | if previous_link_count > 0 { 70 | html 71 | .chars() 72 | .rev() 73 | .collect::() 74 | .replacen(&GEMINI_FRAGMENT.chars().rev().collect::(), "", 1) 75 | .chars() 76 | .rev() 77 | .collect::() 78 | } else { 79 | html.to_string() 80 | } 81 | }; 82 | 83 | if previous_link 84 | && (!matches!(node, Node::Link { .. }) 85 | || (!condense_links && !in_condense_links_flag_trap)) 86 | { 87 | if let Some(next) = ast.iter().skip_while(|n| n != &node).nth(1) { 88 | if matches!(next, Node::Link { .. }) || previous_link { 89 | html.push_str("
"); 90 | } else { 91 | html.push_str("

"); 92 | } 93 | } else { 94 | html.push_str("

"); 95 | } 96 | 97 | previous_link = false; 98 | html = align_adjacent_links(&html); 99 | previous_link_count = 0; 100 | } else if previous_link { 101 | html = align_adjacent_links(&html); 102 | 103 | html.push_str(r#" | "#); 104 | 105 | previous_link_count += 1; 106 | } else if !previous_link && matches!(node, Node::Link { .. }) { 107 | html.push_str("

"); 108 | } 109 | 110 | match node { 111 | Node::Text(text) => { 112 | let _ = write!(&mut html, "

{}

", safe(text)); 113 | } 114 | Node::Link { to, text } => { 115 | let mut href = to.to_string(); 116 | let mut surface = false; 117 | 118 | if href.starts_with("./") || href.starts_with("../") { 119 | if let Ok(url) = url.join(&href) { 120 | href = url.to_string(); 121 | } 122 | } 123 | 124 | if href.contains("://") && !href.starts_with("gemini://") { 125 | surface = true; 126 | } else if !href.contains("://") && href.contains(':') { 127 | href = href.to_string(); 128 | } else if !href.starts_with("gemini://") && !href.starts_with('/') { 129 | href = format!( 130 | "{}/{}", 131 | url.domain().unwrap(), 132 | if url.path().ends_with('/') { 133 | format!("{}{}", url.path(), href) 134 | } else { 135 | format!("{}/{}", url.path(), href) 136 | } 137 | ) 138 | .replace("//", "/"); 139 | href = format!("gemini://{href}"); 140 | } else if href.starts_with('/') || !href.contains("://") { 141 | href = link_from_host_href(url, &href)?; 142 | } 143 | 144 | if var("PROXY_BY_DEFAULT") 145 | .unwrap_or_else(|_| "true".to_string()) 146 | .to_lowercase() 147 | == "true" 148 | && href.contains("gemini://") 149 | && !surface 150 | { 151 | if (configuration.is_proxy()) 152 | || configuration.is_no_css() 153 | || href 154 | .trim_start_matches("gemini://") 155 | .trim_end_matches('/') 156 | .split('/') 157 | .collect::>() 158 | .first() 159 | .unwrap() 160 | != &url.host().unwrap().to_string().as_str() 161 | { 162 | href = format!( 163 | "/{}/{}", 164 | if configuration.is_no_css() { "nocss" } else { "proxy" }, 165 | href.trim_start_matches("gemini://") 166 | ); 167 | } else { 168 | href = href.trim_start_matches("gemini://").replacen( 169 | &if let Some(host) = url.host() { 170 | host.to_string() 171 | } else { 172 | return None; 173 | }, 174 | "", 175 | 1, 176 | ); 177 | } 178 | } 179 | 180 | if let Ok(keeps) = var("KEEP_GEMINI_EXACT") { 181 | let mut keeps = keeps.split(','); 182 | 183 | if (href.starts_with('/') || !href.contains("://")) && !surface { 184 | let temporary_href = link_from_host_href(url, &href)?; 185 | 186 | if keeps.any(|k| k == &*temporary_href) { 187 | href = temporary_href; 188 | } 189 | } 190 | } 191 | 192 | if let Ok(keeps) = var("KEEP_GEMINI_DOMAIN") { 193 | let host = if let Some(host) = url.host() { 194 | host.to_string() 195 | } else { 196 | return None; 197 | }; 198 | 199 | if (href.starts_with('/') 200 | || !href.contains("://") && keeps.split(',').any(|k| k == &*host)) 201 | && !surface 202 | { 203 | href = link_from_host_href(url, &href)?; 204 | } 205 | } 206 | 207 | if let Ok(embed_images) = var("EMBED_IMAGES") { 208 | if let Some(extension) = std::path::Path::new(&href).extension() { 209 | if extension == "png" 210 | || extension == "jpg" 211 | || extension == "jpeg" 212 | || extension == "gif" 213 | || extension == "webp" 214 | || extension == "svg" 215 | { 216 | if embed_images == "1" { 217 | let _ = writeln!( 218 | &mut html, 219 | "

{} Embedded below

", 220 | href, 221 | safe(text.as_ref().unwrap_or(to)), 222 | ); 223 | } 224 | 225 | let _ = writeln!( 226 | &mut html, 227 | "

\"{}\"

", 228 | safe(&href), 229 | safe(text.as_ref().unwrap_or(to)), 230 | ); 231 | 232 | continue; 233 | } 234 | } 235 | } 236 | 237 | previous_link = true; 238 | 239 | let _ = write!( 240 | &mut html, 241 | r#"{}{}"#, 242 | GEMINI_FRAGMENT, 243 | href, 244 | safe(text.as_ref().unwrap_or(to)).trim(), 245 | ); 246 | } 247 | Node::Heading { level, text } => { 248 | if !condensible_headings.contains(&node.to_gemtext().as_str()) { 249 | in_condense_links_flag_trap = false; 250 | } 251 | 252 | if title.is_empty() && *level == 1 { 253 | title = safe(text).to_string(); 254 | } 255 | 256 | let _ = write!( 257 | &mut html, 258 | "<{}>{}", 259 | match level { 260 | 1 => "h1", 261 | 2 => "h2", 262 | 3 => "h3", 263 | _ => "p", 264 | }, 265 | safe(text), 266 | ); 267 | } 268 | Node::List(items) => { 269 | let _ = write!( 270 | &mut html, 271 | "
    {}
", 272 | items 273 | .iter() 274 | .map(|i| format!("
  • {}
  • ", safe(i))) 275 | .collect::>() 276 | .join("\n") 277 | ); 278 | } 279 | Node::Blockquote(text) => { 280 | let _ = write!(&mut html, "
    {}
    ", safe(text)); 281 | } 282 | Node::PreformattedText { text, .. } => { 283 | let mut new_text = text.to_string(); 284 | 285 | new_text.pop(); 286 | 287 | let _ = write!(&mut html, "
    {new_text}
    "); 288 | } 289 | Node::Whitespace => {} 290 | } 291 | } 292 | 293 | Some((title, html)) 294 | } 295 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #![deny( 2 | warnings, 3 | nonstandard_style, 4 | unused, 5 | future_incompatible, 6 | rust_2018_idioms, 7 | unsafe_code 8 | )] 9 | #![deny(clippy::all, clippy::nursery, clippy::pedantic)] 10 | #![recursion_limit = "128"] 11 | #![allow(clippy::cast_precision_loss)] 12 | 13 | mod html; 14 | mod response; 15 | mod url; 16 | 17 | #[macro_use] 18 | extern crate log; 19 | 20 | use {actix_web::web, response::default, std::env::var}; 21 | 22 | #[actix_web::main] 23 | async fn main() -> std::io::Result<()> { 24 | std::env::set_var("RUST_LOG", "actix_web=info"); 25 | dotenv::dotenv().ok(); 26 | pretty_env_logger::init(); 27 | 28 | actix_web::HttpServer::new(move || { 29 | actix_web::App::new() 30 | .default_service(web::get().to(default)) 31 | .wrap(actix_web::middleware::Logger::default()) 32 | }) 33 | .bind(( 34 | "0.0.0.0", 35 | var("PORT").map_or(80, |port| match port.parse::<_>() { 36 | Ok(port) => port, 37 | Err(e) => { 38 | warn!("could not use PORT from environment variables: {}", e); 39 | warn!("proceeding with default port: 80"); 40 | 41 | 80 42 | } 43 | }), 44 | ))? 45 | .run() 46 | .await 47 | } 48 | -------------------------------------------------------------------------------- /src/response.rs: -------------------------------------------------------------------------------- 1 | pub mod configuration; 2 | 3 | use { 4 | crate::url::from_path as url_from_path, 5 | actix_web::{Error, HttpResponse}, 6 | std::{env::var, fmt::Write, time::Instant}, 7 | }; 8 | 9 | const CSS: &str = include_str!("../default.css"); 10 | 11 | #[allow(clippy::future_not_send, clippy::too_many_lines)] 12 | pub async fn default( 13 | http_request: actix_web::HttpRequest, 14 | ) -> Result { 15 | if ["/proxy", "/proxy/", "/x", "/x/", "/raw", "/raw/", "/nocss", "/nocss/"] 16 | .contains(&http_request.path()) 17 | { 18 | return Ok(HttpResponse::Ok() 19 | .content_type("text/html") 20 | .body(r"

    September

    21 |

    This is a proxy path. Specify a Gemini URL without the protocol (gemini://) to proxy it.

    22 |

    To proxy gemini://fuwn.me/uptime, visit https://fuwn.me/proxy/fuwn.me/uptime.

    23 |

    Additionally, you may visit /raw to view the raw Gemini content, or /nocss to view the content without CSS.

    24 | ")); 25 | } 26 | 27 | let mut configuration = configuration::Configuration::new(); 28 | let url = match url_from_path( 29 | &format!("{}{}", http_request.path(), { 30 | if !http_request.query_string().is_empty() 31 | || http_request.uri().to_string().ends_with('?') 32 | { 33 | format!("?{}", http_request.query_string()) 34 | } else { 35 | String::new() 36 | } 37 | }), 38 | false, 39 | &mut configuration, 40 | ) { 41 | Ok(url) => url, 42 | Err(e) => { 43 | return Ok( 44 | HttpResponse::BadRequest() 45 | .content_type("text/plain") 46 | .body(format!("{e}")), 47 | ); 48 | } 49 | }; 50 | let mut timer = Instant::now(); 51 | let mut response = match germ::request::request(&url).await { 52 | Ok(response) => response, 53 | Err(e) => { 54 | return Ok(HttpResponse::Ok().body(e.to_string())); 55 | } 56 | }; 57 | let mut redirect_response_status = None; 58 | let mut redirect_url = None; 59 | 60 | if *response.status() == germ::request::Status::PermanentRedirect 61 | || *response.status() == germ::request::Status::TemporaryRedirect 62 | { 63 | redirect_response_status = Some(*response.status()); 64 | redirect_url = Some( 65 | url::Url::parse(&if response.meta().starts_with('/') { 66 | format!( 67 | "gemini://{}{}", 68 | url.domain().unwrap_or_default(), 69 | response.meta() 70 | ) 71 | } else { 72 | response.meta().to_string() 73 | }) 74 | .unwrap(), 75 | ); 76 | response = 77 | match germ::request::request(&redirect_url.clone().unwrap()).await { 78 | Ok(response) => response, 79 | Err(e) => { 80 | return Ok(HttpResponse::Ok().body(e.to_string())); 81 | } 82 | } 83 | } 84 | 85 | let response_time_taken = timer.elapsed(); 86 | let meta = germ::meta::Meta::from_string(response.meta().to_string()); 87 | let charset = meta 88 | .parameters() 89 | .get("charset") 90 | .map_or_else(|| "utf-8".to_string(), ToString::to_string); 91 | let language = 92 | meta.parameters().get("lang").map_or_else(String::new, ToString::to_string); 93 | 94 | timer = Instant::now(); 95 | 96 | let mut html_context = if configuration.is_raw() { 97 | String::new() 98 | } else { 99 | format!( 100 | r#""#, 101 | if language.is_empty() { 102 | String::new() 103 | } else { 104 | format!(" lang=\"{language}\"") 105 | } 106 | ) 107 | }; 108 | let gemini_html = 109 | crate::html::from_gemini(&response, &url, &configuration).unwrap(); 110 | let gemini_title = gemini_html.0; 111 | let convert_time_taken = timer.elapsed(); 112 | 113 | if configuration.is_raw() { 114 | html_context.push_str( 115 | &response.content().as_ref().map_or_else(String::default, String::clone), 116 | ); 117 | 118 | return Ok( 119 | HttpResponse::Ok() 120 | .content_type(format!("{}; charset={charset}", meta.mime())) 121 | .body(html_context), 122 | ); 123 | } 124 | 125 | if configuration.is_no_css() { 126 | html_context.push_str(&gemini_html.1); 127 | 128 | return Ok( 129 | HttpResponse::Ok() 130 | .content_type(format!("text/html; charset={}", meta.mime())) 131 | .body(html_context), 132 | ); 133 | } 134 | 135 | if let Ok(css) = var("CSS_EXTERNAL") { 136 | let stylesheets = 137 | css.split(',').filter(|s| !s.is_empty()).collect::>(); 138 | 139 | for stylesheet in stylesheets { 140 | let _ = write!( 141 | &mut html_context, 142 | "", 143 | ); 144 | } 145 | } else if !configuration.is_no_css() { 146 | let _ = write!( 147 | &mut html_context, 148 | r#""# 149 | ); 150 | 151 | if let Ok(primary) = var("PRIMARY_COLOUR") { 152 | let _ = write!( 153 | &mut html_context, 154 | "" 155 | ); 156 | } else { 157 | let _ = write!( 158 | &mut html_context, 159 | "" 160 | ); 161 | } 162 | } 163 | 164 | if let Ok(favicon) = var("FAVICON_EXTERNAL") { 165 | let _ = write!( 166 | &mut html_context, 167 | "", 168 | ); 169 | } 170 | 171 | if var("MATHJAX").unwrap_or_else(|_| "true".to_string()).to_lowercase() 172 | == "true" 173 | { 174 | html_context.push_str( 175 | r#""#, 178 | ); 179 | } 180 | 181 | if let Ok(head) = var("HEAD") { 182 | html_context.push_str(&head); 183 | } 184 | 185 | let _ = write!(&mut html_context, "{gemini_title}"); 186 | let _ = write!(&mut html_context, ""); 187 | 188 | if !http_request.path().starts_with("/proxy") { 189 | if let Ok(header) = var("HEADER") { 190 | let _ = write!( 191 | &mut html_context, 192 | "
    {header}
    " 193 | ); 194 | } 195 | } 196 | 197 | match response.status() { 198 | germ::request::Status::Success => { 199 | if let (Some(status), Some(url)) = 200 | (redirect_response_status, redirect_url) 201 | { 202 | let _ = write!( 203 | &mut html_context, 204 | "
    This page {} redirects to {}.
    ", 206 | if status == germ::request::Status::PermanentRedirect { 207 | "permanently" 208 | } else { 209 | "temporarily" 210 | }, 211 | url, 212 | url 213 | ); 214 | } 215 | 216 | html_context.push_str(&gemini_html.1); 217 | } 218 | _ => { 219 | let _ = write!(&mut html_context, "

    {}

    ", response.meta()); 220 | } 221 | } 222 | 223 | let _ = write!( 224 | &mut html_context, 225 | "
    \nProxy Information 226 |
    227 |
    Original URL
    {0}
    229 |
    Status Code
    230 |
    {} ({})
    231 |
    Meta
    {}
    \ 232 | 233 |
    Capsule Response Time
    234 |
    {} milliseconds
    235 |
    Gemini-to-HTML \ 236 | Time
    237 |
    {} milliseconds
    238 |
    239 |

    This content has been proxied \ 240 | by September \ 241 | ({}).

    242 |
    ", 243 | url, 244 | response.status(), 245 | i32::from(*response.status()), 246 | response.meta(), 247 | response_time_taken.as_nanos() as f64 / 1_000_000.0, 248 | convert_time_taken.as_nanos() as f64 / 1_000_000.0, 249 | format_args!("/tree/{}", env!("VERGEN_GIT_SHA")), 250 | env!("VERGEN_GIT_SHA").get(0..5).unwrap_or("UNKNOWN"), 251 | ); 252 | 253 | if let Ok(plain_texts) = var("PLAIN_TEXT_ROUTE") { 254 | if plain_texts.split(',').any(|r| { 255 | path_matches_pattern(r, http_request.path()) 256 | || path_matches_pattern(r, http_request.path().trim_end_matches('/')) 257 | }) { 258 | return Ok(HttpResponse::Ok().body( 259 | response.content().as_ref().map_or_else(String::default, String::clone), 260 | )); 261 | } 262 | } 263 | 264 | Ok( 265 | HttpResponse::Ok() 266 | .content_type(format!("text/html; charset={charset}")) 267 | .body(html_context), 268 | ) 269 | } 270 | 271 | fn path_matches_pattern(pattern: &str, path: &str) -> bool { 272 | if !pattern.contains('*') { 273 | return path == pattern; 274 | } 275 | 276 | let parts: Vec<&str> = pattern.split('*').collect(); 277 | let mut position = if pattern.starts_with('*') { 278 | 0 279 | } else { 280 | let first = parts.first().unwrap(); 281 | 282 | if !path.starts_with(first) { 283 | return false; 284 | } 285 | 286 | first.len() 287 | }; 288 | 289 | let mid_end = parts.len().saturating_sub(1); 290 | 291 | for part in &parts[1..mid_end] { 292 | if part.is_empty() { 293 | continue; 294 | } 295 | 296 | if let Some(found) = path[position..].find(part) { 297 | position += found + part.len(); 298 | } else { 299 | return false; 300 | } 301 | } 302 | 303 | if !pattern.ends_with('*') { 304 | let last = parts.last().unwrap(); 305 | 306 | if !path[position..].ends_with(last) { 307 | return false; 308 | } 309 | } 310 | 311 | true 312 | } 313 | -------------------------------------------------------------------------------- /src/response/configuration.rs: -------------------------------------------------------------------------------- 1 | pub struct Configuration { 2 | is_proxy: bool, 3 | is_raw: bool, 4 | is_no_css: bool, 5 | } 6 | 7 | impl Configuration { 8 | pub const fn new() -> Self { 9 | Self { is_proxy: false, is_raw: false, is_no_css: false } 10 | } 11 | 12 | pub const fn is_proxy(&self) -> bool { 13 | self.is_proxy 14 | } 15 | 16 | pub const fn is_raw(&self) -> bool { 17 | self.is_raw 18 | } 19 | 20 | pub const fn is_no_css(&self) -> bool { 21 | self.is_no_css 22 | } 23 | 24 | pub fn set_proxy(&mut self, is_proxy: bool) { 25 | self.is_proxy = is_proxy; 26 | } 27 | 28 | pub fn set_raw(&mut self, is_raw: bool) { 29 | self.is_raw = is_raw; 30 | } 31 | 32 | pub fn set_no_css(&mut self, is_no_css: bool) { 33 | self.is_no_css = is_no_css; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/url.rs: -------------------------------------------------------------------------------- 1 | use url::Url; 2 | 3 | pub fn from_path( 4 | path: &str, 5 | fallback: bool, 6 | configuration: &mut crate::response::configuration::Configuration, 7 | ) -> Result { 8 | Url::try_from(&*if path.starts_with("/proxy") { 9 | configuration.set_proxy(true); 10 | 11 | format!( 12 | "gemini://{}{}", 13 | path.replace("/proxy/", ""), 14 | if fallback { "/" } else { "" } 15 | ) 16 | } else if path.starts_with("/x") { 17 | configuration.set_proxy(true); 18 | 19 | format!( 20 | "gemini://{}{}", 21 | path.replace("/x/", ""), 22 | if fallback { "/" } else { "" } 23 | ) 24 | } else if path.starts_with("/raw") { 25 | configuration.set_proxy(true); 26 | configuration.set_raw(true); 27 | 28 | format!( 29 | "gemini://{}{}", 30 | path.replace("/raw/", ""), 31 | if fallback { "/" } else { "" } 32 | ) 33 | } else if path.starts_with("/nocss") { 34 | configuration.set_proxy(true); 35 | configuration.set_no_css(true); 36 | 37 | format!( 38 | "gemini://{}{}", 39 | path.replace("/nocss/", ""), 40 | if fallback { "/" } else { "" } 41 | ) 42 | } else { 43 | format!( 44 | "{}{}{}", 45 | { 46 | std::env::var("ROOT").unwrap_or_else(|_| { 47 | warn!( 48 | "could not use ROOT from environment variables, proceeding with \ 49 | default root: gemini://fuwn.me" 50 | ); 51 | 52 | "gemini://fuwn.me".to_string() 53 | }) 54 | }, 55 | path, 56 | if fallback { "/" } else { "" } 57 | ) 58 | }) 59 | } 60 | --------------------------------------------------------------------------------