In mainland China environments, accessing the official GitHub website often results in loading loops or connection resets. Simply hardcoding IPs into hosts tends to become invalid quickly. Below is an introduction to GitHub-Road, which provides stable, proxy-free, and cost-free access through direct hosts connectivity, dynamic IP preference, and automatic self-recovery every 30 minutes.

Plugin Purpose

This is a network utility plugin developed by iTrimut. Its core purpose is to allow browsers to access GitHub directly through hosts, with invalid IPs automatically switched within 30 minutes, without requiring proxy configuration.

Core Features

  • TLS dual verification for IP selection: The script first performs a TLS handshake (with an 8-second timeout), then sends a real HTTPS request. Only IPs returning HTTP 200 are written to hosts, avoiding the selection of IPs that complete the handshake normally but return errors.
  • Automatic self-recovery every 30 minutes: A scheduled task reruns the script every 30 minutes to check IP availability and automatically switches to available IPs when the current one fails.
  • Automatic backup: Before modifying hosts, it automatically backs up to %USERPROFILE%\hosts.backup-*, keeping the most recent 20 copies.
  • Fallback to DNS if all fail: When all candidate IPs are unavailable, it temporarily comments out the hosts entries to avoid pinning a bad IP.

Installation and Enablement

Install the plugin:

dsh plugin --profile web add github:iTrimut/GitHub-Road

After restarting dsh web, confirm that the skill file has been generated:

ls "%USERPROFILE%\.dsh\skills\GitHub-Road\SKILL.md"

Then have the dsh agent execute the skill.

Use Cases and Notes

  • Use case: Primarily resolves blocking issues when accessing github.com from a browser.
  • Coverage: SNI for gist.github.com is blocked and requires a proxy; codeload.github.com, ssh github.com:22, and GitHub Desktop are not covered.
  • Permission requirement: The script runs with administrator privileges, so confirm this before installation.
  • Compatibility check: It is mutually exclusive with hosts management tools (such as Watt Toolkit / Steam++); disable their acceleration features before use.
  • Security advice: It is recommended to set the folder containing the script to be writable by administrators only to prevent tampering.

This solution uses automation to address the frequent invalidation problem of static hosts, making it suitable for users who need stable access to the official GitHub website but find using proxies inconvenient.