Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sgtcodfish/gomod
Very minimal self-hosted go module proxy
https://github.com/sgtcodfish/gomod
Last synced: about 1 month ago
JSON representation
Very minimal self-hosted go module proxy
- Host: GitHub
- URL: https://github.com/sgtcodfish/gomod
- Owner: SgtCoDFish
- License: mit
- Created: 2021-09-27T13:37:59.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-15T23:24:13.000Z (almost 3 years ago)
- Last Synced: 2024-10-14T14:32:05.033Z (3 months ago)
- Language: Makefile
- Size: 24.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gomod
A simple go module proxy, currently designed to be run behind a reverse proxy.
This is intentionally minimal for my own use cases, but it works well.
## Example Nginx Reverse Proxy Config
This assumes letsencrypt certs are available in `/etc/ssl` and safe dhparams in `/etc/ssl/dhparam.pem`. Would be better with TLS 1.3!
```nginx
# vim: filetype=nginxupstream gomod {
server 127.0.0.1:14115;
}server {
server_name gomod.example.com;listen 443 ssl;
autoindex on;proxy_http_version 1.1;
ssl_protocols TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;ssl_ciphers "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256";
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
add_header X-XSS-Protection "1; mode=block";# uncomment if you use HSTS preload
# add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";ssl_certificate /etc/ssl/fullchain.pem;
ssl_certificate_key /etc/ssl/privkey.pem;# uncomment if you're using safe dhparams
# ssl_dhparam /etc/ssl/dhparam.pem;location ~ / {
proxy_pass http://gomod;
}
}
```