Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

希望能支持DNS自定义,或者能够支持自定义GitHub的IP地址 #309

Open
cuicanmengxing opened this issue May 2, 2024 · 26 comments
Assignees
Labels
Feature Request A new feature request Good first issue Good for newcomers
Milestone

Comments

@cuicanmengxing
Copy link

cuicanmengxing commented May 2, 2024

Ⅰ. 请描述你心目中新功能的样子:

可以支持普通的DNS和加密DNS,并将他们所有返回的IP进行测速,或者能够支持自定义GitHub的IP地址。
这样可以极大的提升我访问GitHub的速度。因为默认的所有加密DNS都无法使用。
并且我可以将GitHub的IP地址更改为新加坡或者日本的服务器上去这会更快。我的默认返回的IP地址。是美国的。延时相当高。

@cuicanmengxing cuicanmengxing added the Feature Request A new feature request label May 2, 2024
@cuicanmengxing
Copy link
Author

cuicanmengxing commented May 2, 2024

image
image

@cuicanmengxing
Copy link
Author

屏幕截图 2024-05-02 223558
屏幕截图 2024-05-02 223614

@wangliang181230
Copy link
Contributor

wangliang181230 commented May 3, 2024

你的需求是:

  1. DNS可自定义增删改
  2. DNS获取的IP也进行测速,测速不通过的不进行访问(这个需求,节前已经开始在做了,包括IP优选策略的优化)

可以这么理解吧?

关于自定义GitHub的IP的话,你可以通过 hosts 文件进行配置。

@wangliang181230
Copy link
Contributor

wangliang181230 commented May 6, 2024

issue不用关。

  1. DNS可自定义增删改
  2. DNS获取的IP也进行测速,测速不通过的不进行访问(这个需求,节前已经开始在做了,包括IP优选策略的优化)

这两个需求,是要做的。

@wangliang181230 wangliang181230 self-assigned this May 6, 2024
@wangliang181230 wangliang181230 added this to the 1.8.2 milestone May 6, 2024
@cuicanmengxing
Copy link
Author

我将github.com的IP加入了hosts后仍然是无法自定义IP地址的
image

@cuicanmengxing
Copy link
Author

image
image
#312
我添加了预设IP和360安全DNS还有PIP源
image

预设IP包括github.com,api.github.com,hub.docker.com
我想问一下就是这个collector.github.com要不要加预设,它似乎是一个用来收集信息的,而且时间还挺长
image
并被adguard拦截image

@wangliang181230
Copy link
Contributor

我将github.com的IP加入了hosts后仍然是无法自定义IP地址的

hosts 只是你自己本地使用的配置,和DS的测速功能无关的呀。

@wangliang181230
Copy link
Contributor

如果,你觉得DS可以去读取hosts文件里的IP,添加到测速列表里,供备选,那也是可以的。

@cuicanmengxing
Copy link
Author

不过我修改了http.js
image

@cuicanmengxing
Copy link
Author

直接返回github所有IP,然后测速最快的这样的确可以提升访问速度啊

@wangliang181230
Copy link
Contributor

wangliang181230 commented May 12, 2024

直接返回github所有IP,然后测速最快的这样的确可以提升访问速度啊

嗯,我看了你的PR,不要把IP固定比较好,做成可配置化。

@cuicanmengxing
Copy link
Author

image
我的确知道这个问题,但是我对这个项目的了解还不是非常透彻,所以我已经尽我所能去修改,不过github的IP地址基本上没变过呀,

@wangliang181230
Copy link
Contributor

我的确知道这个问题,但是我对这个项目的了解还不是非常透彻,所以我已经尽我所能去修改,不过github的IP地址基本上没变过呀

嗯,这个我知道,我想说的是这功能不仅仅是只对这几个域名有用,其他域名,可能也需要它。
你稍微调整一下代码,后面我有空时,由我去把它做成可配置化好了。

@cuicanmengxing
Copy link
Author

cuicanmengxing commented May 12, 2024

我的想法是吧这个做到拦截配置里,但说实话我不太明白这个配置之间是如何互通的

image

@wangliang181230 wangliang181230 added the Good first issue Good for newcomers label May 12, 2024
@wangliang181230
Copy link
Contributor

wangliang181230 commented May 12, 2024

我的想法是吧这个做到拦截配置里,但说实话我不太明白这个配置之间是如何互通的

说到拦截配置,我突然记起来,好像已经有这个功能了。

{
    "github.com": {
        ".*": {
            "proxy": "github.com",
            "backup": ["IP1", "IP2"]
        }
    }
}

你这样配置试下看看。

@cuicanmengxing
Copy link
Author

cuicanmengxing commented May 12, 2024

是可以但是这样测速能起效果吗
image

@wangliang181230
Copy link
Contributor

这个备用列表的功能源码,是在这里。

图片

@wangliang181230
Copy link
Contributor

是可以但是这样测速能起效果吗 image

你把sni的配置删了试下。

@wangliang181230
Copy link
Contributor

图片

@cuicanmengxing
Copy link
Author

直接废了
image

@wangliang181230
Copy link
Contributor

我这可以的啊。效果貌似还满好的,速度快。

图片

@cuicanmengxing
Copy link
Author

cuicanmengxing commented May 12, 2024

有没有可能,你可以直连github,只是DNS污染,我这里直接rest
image

@cuicanmengxing
Copy link
Author

cuicanmengxing commented May 12, 2024

换电信后
image

@wangliang181230
Copy link
Contributor

换电信后 image

嗯,我也开始报这个错了。。。不知道为啥。

@wangliang181230
Copy link
Contributor

看来,还是不能用这个代理功能。

@wangliang181230
Copy link
Contributor

wangliang181230 commented May 12, 2024

嗯,好的,有时间再沟通。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request A new feature request Good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants