Skyler Grey | 8b0e52f | 2023-05-01 21:31:07 +0000 | [diff] [blame] | 1 | { |
| 2 | "apps": { |
| 3 | "http": { |
| 4 | "servers": { |
| 5 | "srv0": { |
| 6 | "listen": [":443"], |
| 7 | "routes": [ |
| 8 | { |
| 9 | "match": [ |
| 10 | { |
| 11 | "host": ["signup.hopescaramels.com"] |
| 12 | } |
| 13 | ], |
| 14 | "handle": [ |
| 15 | { |
| 16 | "handler": "subroute", |
| 17 | "routes": [ |
| 18 | { |
| 19 | "handle": [ |
| 20 | { |
| 21 | "handler": "reverse_proxy", |
| 22 | "upstreams": [ |
| 23 | { |
| 24 | "dial": "192.168.0.4:3035" |
| 25 | } |
| 26 | ] |
| 27 | } |
| 28 | ] |
| 29 | } |
| 30 | ] |
| 31 | } |
| 32 | ], |
| 33 | "terminal": true |
| 34 | }, |
| 35 | { |
| 36 | "match": [ |
| 37 | { |
| 38 | "host": ["homebridge.coded.codes"] |
| 39 | } |
| 40 | ], |
| 41 | "handle": [ |
| 42 | { |
| 43 | "handler": "subroute", |
| 44 | "routes": [ |
| 45 | { |
| 46 | "handle": [ |
| 47 | { |
| 48 | "handler": "reverse_proxy", |
| 49 | "upstreams": [ |
| 50 | { |
| 51 | "dial": "localhost:8581" |
| 52 | } |
| 53 | ] |
| 54 | } |
| 55 | ] |
| 56 | } |
| 57 | ] |
| 58 | } |
| 59 | ], |
| 60 | "terminal": true |
| 61 | }, |
| 62 | { |
| 63 | "match": [ |
| 64 | { |
| 65 | "host": [ |
| 66 | "mail.coded.codes", |
| 67 | "mail.clicks.codes", |
| 68 | "mail.hopescaramels.com" |
| 69 | ] |
| 70 | } |
| 71 | ], |
| 72 | "handle": [ |
| 73 | { |
| 74 | "handler": "subroute", |
| 75 | "routes": [ |
| 76 | { |
| 77 | "handle": [ |
| 78 | { |
| 79 | "handler": "reverse_proxy", |
| 80 | "transport": { |
| 81 | "protocol": "http" |
| 82 | }, |
| 83 | "upstreams": [ |
| 84 | { |
| 85 | "dial": "localhost:1080" |
| 86 | } |
| 87 | ] |
| 88 | } |
| 89 | ] |
| 90 | } |
| 91 | ] |
| 92 | } |
| 93 | ], |
| 94 | "terminal": true |
| 95 | }, |
| 96 | { |
| 97 | "match": [ |
| 98 | { |
Skyler Grey | a7fbaee | 2023-05-12 00:29:20 +0000 | [diff] [blame^] | 99 | "host": ["logs.clicks.codes"] |
| 100 | } |
| 101 | ], |
| 102 | "handle": [ |
| 103 | { |
| 104 | "handler": "subroute", |
| 105 | "routes": [ |
| 106 | { |
| 107 | "handle": [ |
| 108 | { |
| 109 | "handler": "reverse_proxy", |
| 110 | "upstreams": [ |
| 111 | { |
| 112 | "dial": "127.0.0.1:9052" |
| 113 | } |
| 114 | ] |
| 115 | } |
| 116 | ] |
| 117 | } |
| 118 | ] |
| 119 | } |
| 120 | ], |
| 121 | "terminal": true |
| 122 | }, |
| 123 | { |
| 124 | "match": [ |
| 125 | { |
Skyler Grey | 8b0e52f | 2023-05-01 21:31:07 +0000 | [diff] [blame] | 126 | "host": ["etherpad.clicks.codes"] |
| 127 | } |
| 128 | ], |
| 129 | "handle": [ |
| 130 | { |
| 131 | "handler": "subroute", |
| 132 | "routes": [ |
| 133 | { |
| 134 | "handle": [ |
| 135 | { |
| 136 | "handler": "reverse_proxy", |
| 137 | "upstreams": [ |
| 138 | { |
| 139 | "dial": "127.0.0.1:9001" |
| 140 | } |
| 141 | ] |
| 142 | } |
| 143 | ] |
| 144 | } |
| 145 | ] |
| 146 | } |
| 147 | ], |
| 148 | "terminal": true |
| 149 | }, |
| 150 | { |
| 151 | "match": [ |
| 152 | { |
| 153 | "host": ["www.hopescaramels.com"] |
| 154 | } |
| 155 | ], |
| 156 | "handle": [ |
| 157 | { |
| 158 | "handler": "subroute", |
| 159 | "routes": [ |
| 160 | { |
| 161 | "handle": [ |
| 162 | { |
| 163 | "handler": "static_response", |
| 164 | "headers": { |
| 165 | "Location": ["https://etsy.com/shop/HopesCaramels"] |
| 166 | }, |
| 167 | "status_code": 302 |
| 168 | } |
| 169 | ] |
| 170 | } |
| 171 | ] |
| 172 | } |
| 173 | ], |
| 174 | "terminal": true |
| 175 | }, |
| 176 | { |
| 177 | "match": [ |
| 178 | { |
| 179 | "host": ["jellyfin.coded.codes"] |
| 180 | } |
| 181 | ], |
| 182 | "handle": [ |
| 183 | { |
| 184 | "handler": "subroute", |
| 185 | "routes": [ |
| 186 | { |
| 187 | "handle": [ |
| 188 | { |
| 189 | "handler": "reverse_proxy", |
| 190 | "upstreams": [ |
| 191 | { |
| 192 | "dial": "localhost:8096" |
| 193 | } |
| 194 | ] |
| 195 | } |
| 196 | ] |
| 197 | } |
| 198 | ] |
| 199 | } |
| 200 | ], |
| 201 | "terminal": true |
| 202 | }, |
| 203 | { |
| 204 | "match": [ |
| 205 | { |
| 206 | "host": ["codedpc.coded.codes"] |
| 207 | } |
| 208 | ], |
| 209 | "handle": [ |
| 210 | { |
| 211 | "handler": "subroute", |
| 212 | "routes": [ |
| 213 | { |
| 214 | "handle": [ |
| 215 | { |
| 216 | "handler": "reverse_proxy", |
| 217 | "upstreams": [ |
| 218 | { |
| 219 | "dial": "192.168.0.2:3389" |
| 220 | } |
| 221 | ] |
| 222 | } |
| 223 | ] |
| 224 | } |
| 225 | ] |
| 226 | } |
| 227 | ], |
| 228 | "terminal": true |
| 229 | }, |
| 230 | { |
| 231 | "match": [ |
| 232 | { |
| 233 | "host": ["testing.coded.codes"] |
| 234 | } |
| 235 | ], |
| 236 | "handle": [ |
| 237 | { |
| 238 | "handler": "subroute", |
| 239 | "routes": [ |
| 240 | { |
| 241 | "handle": [ |
| 242 | { |
| 243 | "handler": "reverse_proxy", |
| 244 | "upstreams": [ |
| 245 | { |
| 246 | "dial": "192.168.0.2:3030" |
| 247 | } |
| 248 | ] |
| 249 | } |
| 250 | ] |
| 251 | } |
| 252 | ] |
| 253 | } |
| 254 | ], |
| 255 | "terminal": true |
| 256 | }, |
| 257 | { |
| 258 | "match": [ |
| 259 | { |
| 260 | "host": ["kavita.coded.codes"] |
| 261 | } |
| 262 | ], |
| 263 | "handle": [ |
| 264 | { |
| 265 | "handler": "subroute", |
| 266 | "routes": [ |
| 267 | { |
| 268 | "handle": [ |
| 269 | { |
| 270 | "handler": "reverse_proxy", |
| 271 | "upstreams": [ |
| 272 | { |
| 273 | "dial": "localhost:5000" |
| 274 | } |
| 275 | ] |
| 276 | } |
| 277 | ] |
| 278 | } |
| 279 | ] |
| 280 | } |
| 281 | ], |
| 282 | "terminal": true |
| 283 | }, |
| 284 | { |
| 285 | "match": [ |
| 286 | { |
| 287 | "host": ["hopescaramels.com"] |
| 288 | } |
| 289 | ], |
| 290 | "handle": [ |
| 291 | { |
| 292 | "handler": "subroute", |
| 293 | "routes": [ |
| 294 | { |
| 295 | "handle": [ |
| 296 | { |
| 297 | "handler": "static_response", |
| 298 | "headers": { |
| 299 | "Location": ["https://etsy.com/shop/HopesCaramels"] |
| 300 | }, |
| 301 | "status_code": 302 |
| 302 | } |
| 303 | ] |
| 304 | } |
| 305 | ] |
| 306 | } |
| 307 | ], |
| 308 | "terminal": true |
| 309 | }, |
| 310 | { |
| 311 | "match": [ |
| 312 | { |
| 313 | "host": ["api.clicks.codes"] |
| 314 | } |
| 315 | ], |
| 316 | "handle": [ |
| 317 | { |
| 318 | "handler": "subroute", |
| 319 | "routes": [ |
| 320 | { |
| 321 | "handle": [ |
| 322 | { |
| 323 | "handler": "subroute", |
| 324 | "routes": [ |
| 325 | { |
| 326 | "handle": [ |
| 327 | { |
| 328 | "handler": "rewrite", |
| 329 | "strip_path_prefix": "/nucleus" |
| 330 | } |
| 331 | ] |
| 332 | }, |
| 333 | { |
| 334 | "handle": [ |
| 335 | { |
| 336 | "handler": "reverse_proxy", |
| 337 | "upstreams": [ |
| 338 | { |
| 339 | "dial": "127.0.0.1:10000" |
| 340 | } |
| 341 | ] |
| 342 | } |
| 343 | ] |
| 344 | } |
| 345 | ] |
| 346 | } |
| 347 | ], |
| 348 | "match": [ |
| 349 | { |
| 350 | "path": ["/nucleus/*"] |
| 351 | } |
| 352 | ] |
| 353 | }, |
| 354 | { |
| 355 | "handle": [ |
| 356 | { |
| 357 | "handler": "static_response", |
| 358 | "status_code": 503 |
| 359 | } |
| 360 | ] |
| 361 | } |
| 362 | ] |
| 363 | } |
| 364 | ], |
| 365 | "terminal": true |
| 366 | }, |
| 367 | { |
| 368 | "match": [ |
| 369 | { |
| 370 | "host": ["omv.coded.codes"] |
| 371 | } |
| 372 | ], |
| 373 | "handle": [ |
| 374 | { |
| 375 | "handler": "subroute", |
| 376 | "routes": [ |
| 377 | { |
| 378 | "handle": [ |
| 379 | { |
| 380 | "handler": "reverse_proxy", |
| 381 | "upstreams": [ |
| 382 | { |
| 383 | "dial": "localhost:6773" |
| 384 | } |
| 385 | ] |
| 386 | } |
| 387 | ] |
| 388 | } |
| 389 | ] |
| 390 | } |
| 391 | ], |
| 392 | "terminal": true |
| 393 | }, |
| 394 | { |
| 395 | "match": [ |
| 396 | { |
| 397 | "host": ["api.coded.codes"] |
| 398 | } |
| 399 | ], |
| 400 | "handle": [ |
| 401 | { |
| 402 | "handler": "subroute", |
| 403 | "routes": [ |
| 404 | { |
| 405 | "handle": [ |
| 406 | { |
| 407 | "handler": "subroute", |
| 408 | "routes": [ |
| 409 | { |
| 410 | "handle": [ |
| 411 | { |
| 412 | "handler": "rewrite", |
| 413 | "strip_path_prefix": "/nucleus" |
| 414 | } |
| 415 | ] |
| 416 | }, |
| 417 | { |
| 418 | "handle": [ |
| 419 | { |
| 420 | "handler": "reverse_proxy", |
| 421 | "upstreams": [ |
| 422 | { |
| 423 | "dial": "192.168.0.2:10000" |
| 424 | } |
| 425 | ] |
| 426 | } |
| 427 | ] |
| 428 | } |
| 429 | ] |
| 430 | } |
| 431 | ], |
| 432 | "match": [ |
| 433 | { |
| 434 | "path": ["/nucleus/*"] |
| 435 | } |
| 436 | ] |
| 437 | }, |
| 438 | { |
| 439 | "handle": [ |
| 440 | { |
| 441 | "handler": "static_response", |
| 442 | "status_code": 404 |
| 443 | } |
| 444 | ] |
| 445 | } |
| 446 | ] |
| 447 | } |
| 448 | ], |
| 449 | "terminal": true |
| 450 | }, |
| 451 | { |
| 452 | "match": [ |
| 453 | { |
| 454 | "host": ["www.clicks.codes"] |
| 455 | } |
| 456 | ], |
| 457 | "handle": [ |
| 458 | { |
| 459 | "handler": "subroute", |
| 460 | "routes": [ |
| 461 | { |
| 462 | "handle": [ |
| 463 | { |
| 464 | "handler": "static_response", |
| 465 | "headers": { |
| 466 | "Location": [ |
| 467 | "https://clicks.codes{http.request.uri}" |
| 468 | ] |
| 469 | }, |
| 470 | "status_code": 302 |
| 471 | } |
| 472 | ] |
| 473 | } |
| 474 | ] |
| 475 | } |
| 476 | ], |
| 477 | "terminal": true |
| 478 | }, |
| 479 | { |
| 480 | "match": [ |
| 481 | { |
| 482 | "host": ["clicks.codes"] |
| 483 | } |
| 484 | ], |
| 485 | "handle": [ |
| 486 | { |
| 487 | "handler": "subroute", |
| 488 | "routes": [ |
| 489 | { |
| 490 | "handle": [ |
| 491 | { |
| 492 | "handler": "reverse_proxy", |
| 493 | "upstreams": [ |
| 494 | { |
| 495 | "dial": "127.0.0.1:3000" |
| 496 | } |
| 497 | ] |
| 498 | } |
| 499 | ] |
| 500 | } |
| 501 | ] |
| 502 | } |
| 503 | ], |
| 504 | "terminal": true |
| 505 | }, |
| 506 | { |
| 507 | "match": [ |
| 508 | { |
| 509 | "host": ["coded.codes"] |
| 510 | } |
| 511 | ], |
| 512 | "handle": [ |
| 513 | { |
| 514 | "handler": "subroute", |
| 515 | "routes": [ |
| 516 | { |
| 517 | "handle": [ |
| 518 | { |
| 519 | "handler": "static_response", |
| 520 | "headers": { |
| 521 | "Location": [ |
| 522 | "https://clicks.codes{http.request.uri}" |
| 523 | ] |
| 524 | }, |
| 525 | "status_code": 302 |
| 526 | } |
| 527 | ] |
| 528 | } |
| 529 | ] |
| 530 | } |
| 531 | ], |
| 532 | "terminal": true |
| 533 | } |
| 534 | ] |
| 535 | }, |
| 536 | "srv1": { |
| 537 | "listen": [":80"], |
| 538 | "routes": [ |
| 539 | { |
| 540 | "match": [ |
| 541 | { |
| 542 | "host": [ |
| 543 | "mail.clicks.codes", |
| 544 | "mail.coded.codes", |
| 545 | "mail.hopescaramels.com", |
| 546 | "autoconfig.coded.codes", |
| 547 | "autoconfig.clicks.codes", |
| 548 | "autoconfig.hopescaramels.com", |
| 549 | |
| 550 | "imap.coded.codes", |
| 551 | "imap.clicks.codes", |
| 552 | "imap.hopescaramels.com", |
| 553 | "pop.coded.codes", |
| 554 | "pop.clicks.codes", |
| 555 | "pop.hopescaramels.com", |
| 556 | "smtp.coded.codes", |
| 557 | "smtp.clicks.codes", |
| 558 | "smtp.hopescaramels.com" |
| 559 | ] |
| 560 | } |
| 561 | ], |
| 562 | "handle": [ |
| 563 | { |
| 564 | "handler": "subroute", |
| 565 | "routes": [ |
| 566 | { |
| 567 | "handle": [ |
| 568 | { |
| 569 | "handler": "reverse_proxy", |
| 570 | "upstreams": [ |
| 571 | { |
| 572 | "dial": "localhost:1080" |
| 573 | } |
| 574 | ] |
| 575 | } |
| 576 | ] |
| 577 | } |
| 578 | ] |
| 579 | } |
| 580 | ], |
| 581 | "terminal": true |
| 582 | } |
| 583 | ] |
| 584 | } |
| 585 | } |
| 586 | }, |
| 587 | "layer4": { |
| 588 | "servers": { |
| 589 | "smtp-25": { |
| 590 | "listen": ["0.0.0.0:25"], |
| 591 | "routes": [ |
| 592 | { |
| 593 | "handle": [ |
| 594 | { |
| 595 | "handler": "proxy", |
| 596 | "proxy_protocol": "v2", |
| 597 | "upstreams": [{ "dial": ["127.0.0.1:1025"] }] |
| 598 | } |
| 599 | ] |
| 600 | } |
| 601 | ] |
| 602 | }, |
| 603 | "smtp-465": { |
| 604 | "listen": ["0.0.0.0:465"], |
| 605 | "routes": [ |
| 606 | { |
| 607 | "handle": [ |
| 608 | { |
| 609 | "handler": "proxy", |
| 610 | "proxy_protocol": "v2", |
| 611 | "upstreams": [{ "dial": ["127.0.0.1:1465"] }] |
| 612 | } |
| 613 | ] |
| 614 | } |
| 615 | ] |
| 616 | }, |
| 617 | "smtp-587": { |
| 618 | "listen": ["0.0.0.0:587"], |
| 619 | "routes": [ |
| 620 | { |
| 621 | "handle": [ |
| 622 | { |
| 623 | "handler": "proxy", |
| 624 | "proxy_protocol": "v2", |
| 625 | "upstreams": [{ "dial": ["127.0.0.1:1587"] }] |
| 626 | } |
| 627 | ] |
| 628 | } |
| 629 | ] |
| 630 | }, |
| 631 | "pop-110": { |
| 632 | "listen": ["0.0.0.0:110"], |
| 633 | "routes": [ |
| 634 | { |
| 635 | "handle": [ |
| 636 | { |
| 637 | "handler": "proxy", |
| 638 | "proxy_protocol": "v2", |
| 639 | "upstreams": [{ "dial": ["127.0.0.1:1110"] }] |
| 640 | } |
| 641 | ] |
| 642 | } |
| 643 | ] |
| 644 | }, |
| 645 | "pop-995": { |
| 646 | "listen": ["0.0.0.0:995"], |
| 647 | "routes": [ |
| 648 | { |
| 649 | "handle": [ |
| 650 | { |
| 651 | "handler": "proxy", |
| 652 | "proxy_protocol": "v2", |
| 653 | "upstreams": [{ "dial": ["127.0.0.1:1995"] }] |
| 654 | } |
| 655 | ] |
| 656 | } |
| 657 | ] |
| 658 | }, |
| 659 | "imap-143": { |
| 660 | "listen": ["0.0.0.0:143"], |
| 661 | "routes": [ |
| 662 | { |
| 663 | "handle": [ |
| 664 | { |
| 665 | "handler": "proxy", |
| 666 | "proxy_protocol": "v2", |
| 667 | "upstreams": [{ "dial": ["127.0.0.1:1143"] }] |
| 668 | } |
| 669 | ] |
| 670 | } |
| 671 | ] |
| 672 | }, |
| 673 | "imap-993": { |
| 674 | "listen": ["0.0.0.0:993"], |
| 675 | "routes": [ |
| 676 | { |
| 677 | "handle": [ |
| 678 | { |
| 679 | "handler": "proxy", |
| 680 | "proxy_protocol": "v2", |
| 681 | "upstreams": [{ "dial": ["127.0.0.1:1993"] }] |
| 682 | } |
| 683 | ] |
| 684 | } |
| 685 | ] |
| 686 | } |
| 687 | } |
| 688 | } |
| 689 | } |
| 690 | } |