oxedyne/fe2o3/fe2o3_steel/README.md
2.1 KiB, 14 runs
created by r1870400018:926, which is this file's identity for as long as the history lasts, whatever it is later renamed to
download · who wrote it · its history
| 1 | # Oxedyne Hematite (fe2o3) |
| 2 | |
| 3 | Hematite is a collection of crates built from first principles, providing foundational tools for building robust applications. See the [github repo](https://github.com/Oxedyne/fe2o3) for more information. |
| 4 | |
| 5 | ## This crate |
| 6 | |
| 7 | Steel is Hematite's TCP server implementation providing HTTPS, WebSocket and SMTPS support. It includes: |
| 8 | |
| 9 | - A robust HTTPS server with WebSocket upgrade support |
| 10 | - Development mode with hot reloading and self-signed certificates |
| 11 | - Production mode with Let's Encrypt certificate automation |
| 12 | - Built-in static file serving and route configuration |
| 13 | - Clean separation between server and application layers |
| 14 | - JavaScript/TypeScript bundling and SASS compilation in development mode |
| 15 | |
| 16 | ## Linux iptables and Port Forwarding |
| 17 | |
| 18 | When you want to serve to the internet using Linux, ports below 1024 are considered privileged, and only the root user can bind to them by default. This is a security feature to prevent unauthorised users from binding to well-known ports. |
| 19 | |
| 20 | If you prefer not to grant additional capabilities to your application, another approach is to use iptables to forward traffic from port 443 to a higher, non-privileged port that your application can bind to. |
| 21 | |
| 22 | 1. Run your application on an unprivileged port (e.g., 8443). |
| 23 | |
| 24 | 2. Set up iptables to forward traffic from port 443 to the port your application is using bash: |
| 25 | |
| 26 | sudo iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8443 |
| 27 | |
| 28 | This approach doesn't require giving special permissions to your application, as the port forwarding is handled by the kernel. |
| 29 | |
| 30 | ## Supporting Development |
| 31 | |
| 32 | This project is developed and maintained through GitHub Sponsors. If you find Hematite valuable for your work or interesting as a project, consider supporting its continued development. No special perks or privileges - just sustainable open source development of innovative Rust infrastructure and apps. |
| 33 | |
| 34 |  |
| 35 | |
| 36 | ## License |
| 37 | |
| 38 | See the [LICENSE](LICENSE) file for license rights and limitations. |
| 39 | |
| 40 | ## Contact |
| 41 | |
| 42 | <hello@oxedyne.com> |