7 Commits

Author SHA1 Message Date
dalbodeule
dfc266f61a [feat](server, client): add runtime validation for critical environment variables
- Introduced `getEnvOrPanic` helper to enforce non-empty required environment variables.
- Added strict validation for server (`HOP_SERVER_*`) and client (`HOP_CLIENT_*`) configurations at startup.
- Updated `.env` loader to prioritize OS env vars over `.env` file values.
- Enhanced structured logging for validated environment variables.
- Improved Makefile with `check-env-server` and `check-env-client` targets for build-time validation.
2025-12-09 00:54:42 +09:00
dalbodeule
c5b3c11df0 [refactor](build, Makefile): drop godotenv dependency and fix Korean grammar in env checks
- Removed `godotenv` dependency from `go.mod` as it's no longer used.
- Corrected Korean grammar in Makefile environment variable validation messages.
2025-12-08 22:26:08 +09:00
dalbodeule
99be2d2e31 [feat](protocol): implement Protobuf codec and integrate into default WireCodec
- Introduced `protobufCodec` supporting length-prefixed Protobuf serialization/deserialization.
- Replaced JSON-based `DefaultCodec` with Protobuf-based implementation.
- Updated generated Protobuf Go types, aligning with `go_package` updates in `hopgate_stream.proto`.
- Added constants and safeguards for Protobuf envelope size limits.
- Modified `Makefile` to accommodate updated Protobuf generation logic.
2025-12-08 20:47:12 +09:00
dalbodeule
1fa5e900f8 [feat](protocol): add Protobuf schemas and code generation for hopgate streams
- Defined `hopgate_stream.proto` with message definitions for stream-based DTLS tunneling, including `Request`, `Response`, `StreamOpen`, `StreamData`, `StreamAck`, and `StreamClose`.
- Added `Envelope` container for top-level message encapsulation.
- Integrated Protobuf code generation into the `Makefile` using `protoc` with `protoc-gen-go`.
- Generated Go types under `internal/protocol/pb`.
2025-12-08 20:30:53 +09:00
dalbodeule
01cd524abe [feat](server, client, build): integrate dotenv for environment variable management (by @ryu31847)
- Added `github.com/joho/godotenv` for loading `.env` files in server and client.
- Implemented environment variable validation and logging in both main programs.
- Updated Makefile with `.env` export and validation steps for required variables.
- Simplified error handling in `writeErrorPage` rendering logic.
2025-12-08 00:13:30 +09:00
dalbodeule
0c4e02f832 [feat](errorpages): add custom templates for HTTP errors and assets
- Implemented custom HTML templates for `400`, `404`, `500`, and `525` error pages with multilingual support.
- Added embedded file system for error page templates and assets.
- Introduced fallback mechanism to serve minimal plain text for missing error templates.
- Integrated TailwindCSS for styling error pages, with a build script in `package.json`.
2025-12-02 21:57:30 +09:00
dalbodeule
4d5b7f15f3 build(deps): add ent and x libs dependencies 2025-11-26 16:32:54 +09:00