This is the 7th day of my participation in the August More Text Challenge

As a developer, often need to each big BBS, or some foreign web site to find some resources, but limited to the domestic network factors, frequently visit slow or directly to open it, just as the world’s largest programmers dating sites making, often can’t open the case or certain images load not to come out. I have been struggling with this problem for a long time. Focus on WX public number: front-end development enthusiasts reply to a key to accelerate the acquisition of acceleration artifact, to help you solve the network slow and card problems, say goodbye to 996

features

1, DNS optimization (to solve the problem of *** pollution)

  • Intelligent resolution of the best domain name according to network conditionsipAddress to get the best network speed
  • Fixed some inaccessible or slow access to websites and libraries
  • It is recommended that you first try to add this domain name to a foreign website that opens slowlydnsSetting (note: invalid blocked by ***)

Request interception

  • Block unopened sites and proxy them to accelerated mirror sites.
  • Multiple mirror stations can be configured for backup
  • With a speed measurement mechanism, when the access fails or times out, the system automatically switches to the standby site, making the target service highly available

Github speeds up

  • githubDirect connection acceleration (by modifying SNI)
  • release,source,zipDownload speed
  • cloneTo speed up
  • Head acceleration
  • To solvereadmeImage reference cannot be loaded in
  • gist.github.comTo speed up
  • To solvegit pushOccasional failure to enter the account password
  • raw/blameTo speed up

Stack Overflow speeds up

  • willajax.google.comProxy to accelerated CDN
  • recaptchaImage captcha acceleration

5. NPM acceleration

  • Support to opennpmThe agent
  • Official and Taobaonpm registryOne-click switch,
  • Some of thenpm installWhen, and usecnpmIf it cannot be installed, enable itnpmThe agent to try again

Safety Warning:

  • Do not use service addresses from unknown sources, which may cause privacy and account leakage risks
  • The application and the server promise not to collect any information. Please use safe mode if you do not mind.

Quick start

Supports Windows and Mac

DevSidecar Desktop application

Procedure 1 Download the installation package

Pay attention to THE WX public number: front-end development enthusiasts reply one-click acceleration to obtain the download installation package

Windows: DevSidecar- X.X.X. exe Mac: DevSidecar- X.X.X. mg Ubuntu: DevSidecar- X.X.X. deb Other Linux versions: Please select DevSidecar- X.X.X. appimage.

Note: Since you did not buy the application certificate, there will be “unknown publisher” and other security prompts when downloading and installing the application, so you can choose to keep it.

2 Open it after installation

Note: To install the MAC version, go to System Preferences -> Security & Privacy -> General to unlock and allow the application to install

3 Install the root certificate

If you open the certificate for the first time, you will be prompted to install the certificate

The root certificate is randomly generated locally, so don’t worry about the security of the root certificate (the application does not collect any user information). You can also customize the root certificate (PEM certificate and private key) in the Accelerator service Settings.

Firefox requires a manual certificate installation

Let’s start speeding up

Try opening Github

The first access will go to a foreign DNS server to obtain the IP address, it will be a bit slower, later faster

Model specification

Safe mode

  • This mode: disable interception, disable enhancement, enable DNS optimization, enable speed measurement
  • You can view the domain name certificate on the left of the address bar of the browser
  • Feature 1 is the least functional, which is equivalent to querying github’s foreign IP address and manually changing hosts.
  • Github’s accessibility is unstable, depending on the IP speed, if there is a green IP, thenThere may beDirect access is available.

The default mode

  • This mode: enable interception, disable enhancement, enable DNS optimization, enable speed measurement
  • You need to install a certificate to directly access Github by modifying the SNI
  • Functions Include features 1/2/3/4.

Best practices

  • Just leave Dev-Sidecar on all the time
  • You are advised to add the domain name to DNS Settings when you encounter foreign websites that open slowly. Note: The domain name blocked by GFW is invalid.

Other accelerated

  1. Git clone acceleration

Mode 1: Quick Copy:

Turn on script support and copy to the accelerated link under the Clone link

Method 2:

How to speed up clone hub.fastgit.org/{username}/… Clone remote “Origin” is the fastgit address, you can manually change it back to the remote “Origin” address. You can also use their Clone accelerator, Fgit-Go

  1. Github.com mirror site (note: can’t log in)
    1. hub.fastgit.org
    2. Github.com.cnpmjs.org This one easily goes over the limit

Pay attention to THE WX public number: front-end development enthusiasts reply one-click acceleration to obtain the download installation package

api

Intercept configuration

If the domain name is not configured, the interception is processed based on the configuration

const intercepts = {
  // Domain name to block
  'github.com': {
     // Need to intercept url regular expression
     '/.*/.*/releases/download/': {
        // Interception type
        // redirect: temporary redirection (url changes, some download resources can be configured this way)
        // proxy:url, proxy (url does not change, no cross-domain problem)
        // Abort :true, abort the request (this is used to abort resources blocked by the GFW. If no alternative is found, abort the request quickly and save time)
        // success:true, return success request directly (some requests do not want to send, can be disguised as success return)
        redirect: 'download.fastgit.org'
      },
      '*': {proxy:'github.com'.sni:'baidu.com' // Modify snI to avoid handshake interception}},'ajax.googleapis.com': {
     '*': {
       proxy: 'ajax.loli.net'.// Proxy request, the URL does not change
       backup: ['ajax.proxy.ustclug.org'].// Backup, if the current proxy request fails, it will be switched to the alternate address
       test: 'ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js'.replace:'/(.*)/xxx'// If the link to the accelerated address is not exactly the same as the original link, we can use the regular expression replace. In this case, proxy reassemps the URL with $1$2, proxy:'ajax.loli.net/xxx/$1'.}},'clients*.google.com': {
      '*': {abort: true // Cancel the request. If the resource blocked by GFW cannot be replaced, cancel the request directly}}}Copy the code

DNS Preferred Configuration

Some of the resolved IP addresses will be inaccessible (for example, api.github.com will be resolved to an IP address in Singapore. The Singapore server is fine in the morning, but by evening it will be frozen and basically unavailable). Try switching between different IP addresses by getting the IP list from DNS. Eventually, the fastest IP will be picked

 dns: {
    mapping: {
      //
      'api.github.com': 'usa'.// "Solve the problem of password input for push ",
      'gist.github.com': 'usa' // Fix gist not accessible
      "*.githubusercontent.com": "usa" // Fixed an issue where github avatars often failed to download}},Copy the code

Note: Only IPv4 resolution is supported for now

Troubleshoot problems

1. The first two switches of dev-sidecar are not enabled

  1. Try turning the switch button on manually
  2. Please try right clickdev-sidecarIcon, click Exit. Re-open
  3. If not, send the log to the author

If the MAC system is used, the reasons may be as follows

The system agent switch on the home page cannot be turned on when the Mac operating system is used

This problem may occur because the system agent command execution permission is not enabled

Networksetup -setwebproxy 'WiFi' 127.0.0.1 1181 # Error: Command requires admin PRIVILEGESCopy the code

If the above error message is displayed, try the following two methods:

System Preferences – > Security and Privacy – > General – > Advanced – > Access to system-wide preferences Requires an administrator password (deselected)

2. The possible cause is that Xcode is installed but not authorized. Enter the following command on the terminal for authorization

Sudo xcodebuild-license # Press Enter to agreeCopy the code

Then try again to see if you can turn on the system agent switch. If not, please contact the author

2. No acceleration effect

This application only supports HTTPS acceleration, please make sure that the website address you visit starts with HTTPS

  1. This application only supports HTTPS acceleration please make sure that the address you visit starts with HTTPS e.g. github.com/

  2. Is there any plugin installed in the browser that conflicts with the DS

  3. Check whether other agent software is installed and conflicts with DS

  4. Ensure that the proxy of the browser is set to IE proxy or system proxy

  5. Try a different browser

  6. Ensure that the network proxy is selected. Normally, dev-sidecar automatically sets the proxy when the System Proxy switch is turned on.

3. The browser displays a message indicating that the certificate is not trusted

  • Windows: Ensure that the certificate is correctly installed under Trusted Root Certification Authorities

  • MAC: Make sure the certificate is installed and the trust is set.

  • Firefox: Firefox does not use the system root certificate. You need to add the root certificate in firefox browser > Options > Privacy and Security > Certificates > View Certificates. Certificate Authority > Import C:\Users \Administrator(your account)\.dev-sidecar\dev-sidecar.ca. CRT (~/.dev-sidecar directory for Mac or Linux)\.dev-sidecar 4. Check to trust the certification authority to identify the site

4. Open Github and the message “Connection timed out” is displayed

DevSidecar Warning: Error: www.github.com:443, the agent request timed outCopy the code

If it is in secure mode, it is caused by instability, wait for a moment to refresh. If it is in enhanced mode, it is caused by too many visitors, which is normal

5. Check whether an error occurs in the log

If it still does not work, please add the author’s friend below and send the service log to the author for analysis. Log opening mode: Accelerate service -> Log button on the right -> Open the log folder

Some websites that can be opened can’t be opened

  • You can try to close the PAC
  • You can whitelist a domain name

7, the application unexpectedly shut down, resulting in no network

The system agent Settings are automatically modified after an application is enabled. The system Agent is automatically disabled after you exit the system Agent. If an application is shut down unexpectedly, the system agent may not be recovered and the Internet access may be unavailable.

There are several solutions to this problem:

  • Re-open the application (right-click the application tray icon to exit completely, which will normally close the system agent Settings)
  • If the application is uninstalled, you need to manually turn off the system agent Settings

The last

Write the article is not easy, remember to pay attention to wechat public number: front-end development enthusiasts to this article to a triple punch it 👍👍👍. Reply to one-click acceleration to get acceleration artifact, help you solve the network slow and slow problem, goodbye 996🔥🔥🔥