2022-12-18 04:27:19 +09:00
# GotHub
2022-10-24 21:24:32 +09:00
2022-12-18 04:27:19 +09:00
Alternative front-end for GitHub written with Go. (WIP)
2023-02-11 17:33:01 +09:00
2022-12-18 04:27:19 +09:00
[Matrix ](https://matrix.to/#/%23gothub%3Atrygve.me?via=projectsegfau.lt&via=vern.cc&via=matrix.org&via=trygve.me )
2023-04-02 04:08:46 +09:00
[![Go Report Card ](https://goreportcard.com/badge/codeberg.org/gothub/gothub )](https://goreportcard.com/report/codeberg.org/gothub/gothub)
2022-11-30 05:49:43 +09:00
2022-12-18 04:27:19 +09:00
## Features
- Lightweight - for both you and the instance host
- No JavaScript - pure HTML and CSS goodness
- No requests made to Micro$oft - they won't even know you made a request!
- Open source - for peer review & trustworthiness
- Save bandwidth - no JavaScript/tracking bloat loaded!
2022-12-02 07:14:24 +09:00
2022-12-18 04:27:19 +09:00
## Instances
2023-02-10 04:58:57 +09:00
### Difference between branches
The ``master`` branch runs on the master branch of GotHub. This means that the instance is running a stable, tested version of GotHub that doesn't get updated as much as ``dev``. Doesn't mean they're not bad though!
2023-01-14 04:35:45 +09:00
2023-02-10 04:58:57 +09:00
``dev`` instances run on the dev branch of GotHub. This might mean they are more up-to-date than other instances, but at the same time, they might not be (instance admin might not always update their instance, no auto-updates etc.). You can get the latest and greatest straight out of Git, but you could meet on bugs and other nasty things.
| Link | Cloudflare | Country | ISP | Branch |
| -------- | ---------- | ----------- | ----- | ----- |
2023-03-26 15:58:32 +09:00
| [gothub.projectsegfau.lt ](https://gothub.projectsegfau.lt ) (official) | No | GeoDNS | BuyVM/Bharti Airtel/Digital Ocean | master |
2023-03-07 21:09:13 +09:00
| [gh.odyssey346.dev ](https://gh.odyssey346.dev ) | No | 🇫🇷 | OVHcloud (Trolling Solutions) | master |
2023-02-10 04:58:57 +09:00
| [gh.riverside.rocks ](https://gh.riverside.rocks ) | No | 🇺🇸 | Comcast | master |
| [gh.vern.cc ](https://gh.vern.cc )[^1] | No | 🇺🇸 | Hetzner | master |
| [gh.akisblack.dev ](https://gh.akisblack.dev ) | No | 🇩🇪 | OVHcloud | master |
| [gothub.lunar.icu ](https://gothub.lunar.icu ) | Yes | 🇩🇪 | Unesty | master |
2023-03-07 21:16:06 +09:00
| [gh.phreedom.club ](https://gh.phreedom.club ) | No | 🇮🇸 | Flokinet | master |
2023-03-24 01:07:23 +09:00
| [gothub.dev.projectsegfau.lt ](https://gothub.dev.projectsegfau.lt ) (official) | No | 🇱🇺 | BuyVM | dev |
2023-03-07 21:09:13 +09:00
| [gh.dev.odyssey346.dev ](https://gh.dev.odyssey346.dev ) | No | 🇫🇷 | OVHcloud (Trolling Solutions) | dev |
2023-02-10 04:58:57 +09:00
| [gothub.esmailelbob.xyz ](https://gothub.esmailelbob.xyz ) | No | 🇨🇦 | OVHcloud | dev |
| [dev.gh.akisblack.dev ](https://dev.gh.akisblack.dev ) | No | 🇩🇪 | OVHcloud | dev |
2023-03-11 23:47:47 +09:00
| [gh.777.tf ](https://gh.777.tf ) | No | 🇫🇮 | Own ISP | dev |
2023-01-14 04:35:45 +09:00
Have an instance you want on the list? Make an issue or PR!
2023-03-07 21:35:57 +09:00
You can find a json-list of the same in [gothub/gothub-instances ](https://codeberg.org/gothub/gothub-instances ).
2023-01-14 04:35:45 +09:00
[^1]: Has some modifications: https://git.vern.cc/vern/modifications/src/branch/master/gothub
2022-12-02 07:14:24 +09:00
2022-12-18 04:27:19 +09:00
## Setup
### Docker
We recommend Docker as it is easy to update GotHub that way and it is easy to setup.
[Packages page ](https://codeberg.org/gothub/-/packages/container/gothub/latest )
2023-03-07 22:40:41 +09:00
```docker
2022-12-18 04:48:50 +09:00
docker run -d -p 3000:3000 --name gothub codeberg.org/gothub/gothub
2022-12-18 04:27:19 +09:00
```
If you are using Portainer or Podman, you know how to create the GotHub container.
### Manual
You will need an installation of Go 1.19+ installed on your system.
2023-02-11 04:31:21 +09:00
We recommend setting the `GO_TELEMETRY` environment variable to `off` . In the future, the Go CLI will send telemetry to Google, which you might not want.
2022-12-18 04:27:19 +09:00
```bash
git clone https://codeberg.org/gothub/gothub.git
cd gothub
go build -o gothub
./gothub serve
```
2022-12-18 04:48:50 +09:00
If you don't want to use port 3000 for GotHub, set the GOTHUB_PORT environment variable to the port you want to use.
2022-12-27 23:19:26 +09:00
2023-03-07 23:25:52 +09:00
If you want to be in the official instance list, you also need to fill these Instance Privacy environment variables:
```
GOTHUB_IP_LOGGED=true/false
GOTHUB_REQUEST_URL_LOGGED=true/false
GOTHUB_USER_AGENT_LOGGED=true/false
GOTHUB_DIAGNOSTIC_INFO_LOGGED=true/false
GOTHUB_INSTANCE_PRIVACY_POLICY=""
GOTHUB_INSTANCE_COUNTRY=""
GOTHUB_INSTANCE_PROVIDER=""
GOTHUB_INSTANCE_CLOUDFLARE=true/false
```
2023-02-11 05:07:46 +09:00
### Web server configuration (Caddy)
We recommend Caddy for the web server, as it provides automatic HTTPS, HTTP/3 and is easy to setup.
```caddyfile
gothub.example.com {
2023-02-11 05:21:00 +09:00
reverse_proxy localhost:(the port for GotHub)
2023-02-11 05:07:46 +09:00
}
```
2023-02-10 18:13:06 +09:00
## Scraping
2023-03-07 21:35:57 +09:00
Other than for the explore page, gothub uses scraping in order to retrieve the information.
This makes it hard for gothub to get ratelimited.
You can also set the GOTHUB_USER_AGENT envvar in order to set the user agent with which GotHub makes requests to Github.
By default, we use the user agent of Chrome 110 on Windows 10.
2022-12-27 23:19:26 +09:00
## DMCA/Legal notice
2023-03-09 01:47:31 +09:00
All content shown on a GotHub instance is from GitHub. Any issues with content shown on a GotHub instance need to be reported to GitHub, not the instance host's internet or domain provider.
2022-12-27 23:19:26 +09:00
2023-02-10 18:13:06 +09:00
GitHub is a registered trademark of GitHub, Inc. GotHub is not affiliated with GitHub, Inc.