Code Monkey home page Code Monkey logo

githubips's Introduction

GithubIps

由于天朝问题,有时候某个IP被墙了,就会出现图片显示不全或者显示不了的问题

本项目是用Golang写的简单程序,用于获取GitHub的最新IP,解决无法显示GitHub的图片

主要使用第三方包soup.

我已经编译好了Mac、Linux和Windows三个平台的可执行文件
大家可以按自己的平台自己下载或自行编译。

Or Docker获取

docker pull docker.pkg.github.com/sanbolee/githubips/githubips:v1.0

运行

Mac

chmod +x GithubIps_mac
./GithubIps_mac

Linux

chmod +x GithubIps_linux
./GithubIps_linux

Windows

双击666即可

结果

正在输出结果,请稍等:
199.232.68.133   avatars1.githubusercontent.com
199.232.68.133   raw.githubusercontent.com
199.232.68.133   avatars3.githubusercontent.com
199.232.68.133   avatars7.githubusercontent.com
199.232.68.133   avatars2.githubusercontent.com
199.232.68.133   camo.githubusercontent.com
199.232.68.133   avatars5.githubusercontent.com
185.199.108.153   spotlights-feed.github.com
185.199.108.153   assets-cdn.github.com
140.82.112.4   gist.github.com
199.232.68.133   avatars4.githubusercontent.com
199.232.68.133   avatars0.githubusercontent.com
199.232.68.133   avatars8.githubusercontent.com
199.232.68.133   avatars6.githubusercontent.com
199.232.68.133   gist.githubusercontent.com
199.232.68.133   cloud.githubusercontent.com
140.82.114.4   github.com
输出结果完毕,请复制粘贴到hosts文件。
Mac系统和Linux系统hosts文件位置:/etc/hosts
Win系统hosts文件位置:c:/windows/system32/drivers/etc/hosts

编译

Mac 下压缩编译 Linux 和 Windows 64位可执行程序

CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-w -s" main.go
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-w -s" main.go

Linux 下压缩编译 Mac 和 Windows 64位可执行程序

CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-w -s" main.go
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-w -s" main.go

Windows 下压缩编译 Mac 和 Linux 64位可执行程序

SET CGO_ENABLED=0
SET GOOS=darwin
SET GOARCH=amd64
go build -ldflags "-w -s" main.go

SET CGO_ENABLED=0
SET GOOS=linux
SET GOARCH=amd64
go build -ldflags "-w -s" main.go

githubips's People

Contributors

sanbolee avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.