{"id":13548475,"url":"https://github.com/r7wx/easy-gate","last_synced_at":"2025-04-02T21:31:36.468Z","repository":{"id":40235594,"uuid":"483009225","full_name":"r7wx/easy-gate","owner":"r7wx","description":"A gate to your self hosted infrastructure","archived":false,"fork":false,"pushed_at":"2024-10-14T22:40:02.000Z","size":1689,"stargazers_count":315,"open_issues_count":0,"forks_count":18,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-03T17:39:42.405Z","etag":null,"topics":["dashboard","docker","go","self-hosted","startpage"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/r7wx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-18T21:57:59.000Z","updated_at":"2024-10-15T05:10:25.000Z","dependencies_parsed_at":"2024-01-14T03:51:37.181Z","dependency_job_id":"110673f3-96d4-4bb9-a991-f4bdeb0d87d8","html_url":"https://github.com/r7wx/easy-gate","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r7wx%2Feasy-gate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r7wx%2Feasy-gate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r7wx%2Feasy-gate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r7wx%2Feasy-gate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r7wx","download_url":"https://codeload.github.com/r7wx/easy-gate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246895779,"owners_count":20851325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dashboard","docker","go","self-hosted","startpage"],"created_at":"2024-08-01T12:01:10.850Z","updated_at":"2025-04-02T21:31:36.004Z","avatar_url":"https://github.com/r7wx.png","language":"Go","funding_links":[],"categories":["Go","置顶"],"sub_categories":["1、AI应用生态"],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/r7wx/easy-gate\"\u003e\n     \u003cpicture\u003e\n       \u003cimg width=\"90\" src=\"assets/logo.svg\" /\u003e\u003c/a\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n  \u003cbr /\u003e\n  \u003cb\u003eeasy-gate\u003c/b\u003e\n  \u003cbr /\u003e \u003cbr /\u003e\n  \u003cimg src=\"https://img.shields.io/github/v/release/r7wx/easy-gate\" alt=\"Release\" /\u003e\n  \u003ca href=\"https://github.com/r7wx/easy-gate/actions/workflows/build.yml\"\u003e\n  \u003cimg src=\"https://github.com/r7wx/easy-gate/actions/workflows/build.yml/badge.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/r7wx/easy-gate/actions/workflows/test.yml\"\u003e\n  \u003cimg src=\"https://github.com/r7wx/easy-gate/actions/workflows/test.yml/badge.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.codefactor.io/repository/github/r7wx/easy-gate\"\u003e\u003cimg src=\"https://www.codefactor.io/repository/github/r7wx/easy-gate/badge?s=3531cadc71a73618609de429289d9524a38c33cd\" alt=\"CodeFactor\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003ch4 align=\"center\"\u003eA gate to your self hosted infrastructure\u003c/h3\u003e\n\n---\n\n\u003cimg src=\"assets/demo.png\" /\u003e\n\n\u003cp align=\"justify\"\u003e\nEasy Gate is a simple web application designed to serve as the central hub for your self-hosted infrastructure. With real-time parsing of services and notes from a configuration file, Easy Gate ensures seamless updates without the need to restart the application. Moreover, it offers the flexibility to assign items to specific user groups, allowing tailored access based on their IP addresses.\n\u003c/p\u003e\n\n### Features\n\n- Real-time parsing of services and notes from a configuration file (JSON/YAML) without requiring application restarts.\n- Flexible assignment of services and notes to one or more user groups, ensuring items are displayed exclusively to specific users based on their IP addresses.\n- Organization of services into categories.\n- Customizable theme and icons.\n- Versatile deployment options with the choice to run Easy Gate as a standalone executable, free from external dependencies, or as a Docker container.\n\n## Deployment\n\n### Standalone Executable\n\n\u003cp align=\"justify\"\u003e\nIn order to run Easy Gate as a standalone executable, you can build it from source code or download a pre-built binary from the latest release.\n\u003c/p\u003e\n\n**Build from source:**\n\n```bash\ngit clone https://github.com/r7wx/easy-gate.git\ncd easy-gate\nmake\n```\n\n**Run executable:**\n\n```bash\neasy-gate \u003cpath-to-config-file\u003e\n```\n\n\u003cp align=\"justify\"\u003e\nConfiguration file can be either a JSON or a YAML file.\n\u003c/p\u003e\n\n### Docker\n\n\u003cp align=\"justify\"\u003e\nYou can deploy an instance of Easy Gate by using Docker:\n\u003c/p\u003e\n\n```bash\ndocker run -d --name=easy-gate \\\n  -p 8080:8080 \\\n  -v /path/to/easy-gate.json:/etc/easy-gate/easy-gate.json \\\n  --restart unless-stopped \\\n  r7wx/easy-gate:latest\n```\n\n\u003cp align=\"justify\"\u003e\nBy default the Easy Gate image will look for a configuration file in /etc/easy-gate/easy-gate.json, but this value can be overridden by using the EASY_GATE_CONFIG_PATH environment variable:\n\u003c/p\u003e\n\n```bash\ndocker run -d --name=easy-gate \\\n  -p 8080:8080 \\\n  -v /path/to/easy-gate.yml:/another/path/easy-gate.yml \\\n  --restart unless-stopped \\\n  -e EASY_GATE_CONFIG_PATH=/another/path/easy-gate.yml \\\n  r7wx/easy-gate:latest\n```\n\n### Docker Compose\n\nYou can run Easy Gate by using the provided docker-compose file:\n\n```yml\nservices:\n  easy-gate:\n    image: r7wx/easy-gate:latest\n    build: .\n    container_name: easy-gate\n    restart: unless-stopped\n    ports:\n      - 8080:8080\n    volumes:\n      - ./easy-gate.json:/etc/easy-gate/easy-gate.json\n```\n\n```bash\ndocker-compose up\n```\n\n\u003cp align=\"justify\"\u003e\nBy default the Easy Gate image will look for a configuration file in /etc/easy-gate/easy-gate.json, but this value can be overridden by using the EASY_GATE_CONFIG_PATH environment variable:\n\u003c/p\u003e\n\n```yml\nservices:\n  easy-gate:\n    image: r7wx/easy-gate:latest\n    build: .\n    container_name: easy-gate\n    restart: unless-stopped\n    environment:\n      - EASY_GATE_CONFIG_PATH=/etc/easy-gate/easy-gate.yml\n    ports:\n      - 8080:8080\n    volumes:\n      - ./easy-gate.yml:/etc/easy-gate/easy-gate.yml\n```\n\n### Docker Compose (behind proxy)\n\n\u003cp align=\"justify\"\u003e\nIf you need to host Easy Gate behind an already running nginx instance (or other reverse proxies), you can use the docker-compose file in the examples directory:\n\u003c/p\u003e\n\n```yml\nservices:\n  easy-gate:\n    image: r7wx/easy-gate:latest\n    container_name: easy-gate\n    expose:\n      - 8080\n    networks:\n      - nginx-net\n    volumes:\n      - ../easy-gate.json:/etc/easy-gate/easy-gate.json\n\n  nginx:\n    image: nginx:latest\n    container_name: nginx\n    ports:\n      - 80:80\n    networks:\n      - nginx-net\n    volumes:\n      - ./nginx.conf:/etc/nginx/conf.d/default.conf\n\nnetworks:\n  nginx-net:\n    driver: bridge\n```\n\n\u003cp align=\"justify\"\u003e\nIn order to correctly use the groups feature, the nginx instance (or your other reverse proxy) must be configured to use the X-Forwarded-For header:\n\u003c/p\u003e\n\n```nginx\n[...]\nlocation / {\n  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n  proxy_pass http://easy-gate:8080;\n}\n[...]\n```\n\nIt is also mandatory to set \"behind_proxy\" to true in your easy-gate configuration file:\n\n```json\n[...]\n\"behind_proxy\": true,\n[...]\n```\n\nYou can find the complete docker-compose and nginx configuration files in the examples directory. The same logic applies to standalone and Docker deployments.\n\n## Configuration\n\n\u003cp align=\"justify\"\u003e\nEasy gate can be configured by a JSON or a YAML configuration file. An example configuration is provided in the root directory of this repository (easy-gate.json/easy-gate.yml).\n\u003c/p\u003e\n\n### Options\n\n- **addr:** IP address to listen on\n- **use_tls:** If true, the application will use TLS\n- **cert_file:** Path to the SSL certificate file (if TLS is enabled)\n- **key_file:** Path to the SSL key file (if TLS is enabled)\n- **behind_proxy:** If true, the application will use the X-Forwarded-For header to determine the IP address of the client\n- **title:** Title of the application\n\n### Theme\n\n\u003cp align=\"justify\"\u003e\nEasy Gate theme can be configured by providing colors for background and foreground. Theme changes will be applied immediately.\n\u003c/p\u003e\n\nExample of a dark mode theme:\n\n#### JSON\n\n```json\n\"theme\": {\n  \"background\": \"#1d1d1d\",\n  \"foreground\": \"#ffffff\",\n}\n```\n\n#### YAML\n\n```yml\ntheme:\n  background: \"#FFFFFF\"\n  foreground: \"#000000\"\n```\n\n\u003cp align=\"justify\"\u003e\nIt is also possible to use a custom css file by providing the path to the file:\n\u003c/p\u003e\n\n#### JSON\n\n```json\n\"theme\": {\n  \"custom_css\": \"/path/to/custom.css\"\n}\n```\n\n#### YAML\n\n```yml\ntheme:\n  custom_css: \"/path/to/custom.css\"\n```\n\n\u003cp align=\"justify\"\u003e\nKeep in mind, even if you provide a custom css file, the background and foreground colors will still be applied as long as you provide the correct templating keys in your custom css file like so:\n\u003c/p\u003e\n\n```\nbody {\n  background: {{.Background}};\n  color: {{.Foreground}};\n}\n```\n\n### Groups\n\n\u003cp align=\"justify\"\u003e\nGroup entries are used to define which users can see which items, by providing the user subnet. Group functionality is useful when dealing with both internal network and VPN users.\n\n\u003c/p\u003e\n\n#### JSON\n\n```json\n\"groups\": [\n  {\n    \"name\": \"internal\",\n    \"subnet\": \"192.168.1.1/24\"\n  },\n  {\n    \"name\": \"vpn\",\n    \"subnet\": \"10.8.1.1/24\"\n  }\n]\n```\n\n#### YAML\n\n```yml\ngroups:\n  - name: internal\n    subnet: 192.168.1.1/24\n  - name: vpn\n    subnet: 10.8.1.1/24\n```\n\n### Services\n\n\u003cp align=\"justify\"\u003e\nA service entry is used to define a service that is available in the infrastructure. Each service has the following configurable parameters:\n\n- **name:** the name of the service (ex. Internal Git, Jenkins, ...)\n- **url:** the service url (must be a valid url starting with http(s)://)\n- **category (optional):** service category (each service will appear under its own category).\n- **groups:** list of groups associated to this service (defined in the groups section). If no group is provided the item can be seen by all users:\n- **icon (optional):** the icon parameter accepts image URLs or data URI. If the icon parameter is not provided or empty, Easy Gate will try to fetch the service favicon and display it or fallback to a default icon.\n\n\u003c/p\u003e\n\n#### JSON\n\n```json\n{\n  \"name\": \"Git\",\n  \"url\": \"https://git.example.internal\",\n  \"groups\": [\n      \"vpn\"\n  ]\n},\n{\n  \"name\": \"Portainer\",\n  \"url\": \"https://portainer.example.all\",\n  \"category\": \"Test\",\n  \"icon\": \"data:image/png;base64,[...]\",\n  \"groups\": []\n}\n```\n\n#### YAML\n\n```yml\n- name: Git\n  url: https://git.example.internal\n  groups:\n    - vpn\n- name: Portainer\n  url: https://portainer.example.all\n  category: \"Test\"\n  icon: data:image/png;base64,[...]\n  groups: []\n```\n\n### Notes\n\n\u003cp align=\"justify\"\u003e\nA note entry is used to define a simple text note which has a title and a content. Each note has a name, the note content (text) and the groups that can see it (defined in the groups section). If no group is provided the item can be seen by all users:\n\u003c/p\u003e\n\n#### JSON\n\n```json\n{\n  \"name\": \"Simple note\",\n  \"text\": \"This is a simple note for vpn users\",\n  \"groups\": [\n    \"vpn\"\n  ]\n},\n{\n  \"name\": \"Global note\",\n  \"text\": \"This note will be visible to everyone\",\n  \"groups\": []\n}\n```\n\n#### YAML\n\n```yml\n- name: Simple note\n  text: This is a simple note for vpn users\n  groups:\n    - vpn\n- name: Global note\n  text: This note will be visible to everyone\n  groups: []\n```\n\n### Environment Variables\n\n- **EASY_GATE_CONFIG_PATH:** Easy Gate configuration file path can be provided by this environment variable. The value will have precedence over the configuration file path provided in the command line.\n- **EASY_GATE_CONFIG:** Insted of providing a configuration file, it is possible to provide the entire configuration as a JSON or YAML string in this environment variable. The content of this variable will have precedence over the configuration file.\n- **EASY_GATE_ROOT_PATH:** This environment variable lets you specify a custom root directory for the Easy Gate application.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr7wx%2Feasy-gate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr7wx%2Feasy-gate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr7wx%2Feasy-gate/lists"}