IpAddressList不起作用
hccz95 opened this issue · 7 comments
hccz95 commented
Bug描述
设置IpAddressList不起作用,无法将监听地址从localhost改为0.0.0.0
重现步骤
- 修改appsettings.json
- 启动fastgithub
软件信息
- 操作系统: Ubuntu 20.04 x64
- FastGithub:v2.1.4
bash输出信息:
(base) kk@kk:/home/user/fastgithub_linux-x64$ cat appsettings.json
{
// 新增的子配置文件appsettings.*.json,重启应用程序才生效
"FastGithub": {
"HttpProxyPort": 9527, // http代理端口,linux/osx平台使用
"IpAddressList": [ // http代理端口,linux/osx平台使用
"0.0.0.0"
],
"RedirectHost": "fastgithub.local",
"FallbackDns": [ // 以下dns必须要支持tcp
"8.8.8.8:53",
"119.29.29.29:53",
"114.114.114.114:53"
],
"DomainConfigs": {
"*.fastgithub.com": { // 域名的*表示除.之外0到多个任意字符
"TlsSni": false, // 指示tls握手时是否发送SNI
"TlsSniPattern": null, // SNI表达式,@domain变量表示取域名值 @ipaddress变量表示取ip @random变量表示取随机值,其它字符保留不替换
"TlsIgnoreNameMismatch": false, // 是否忽略服务器证书域名不匹配,当不发送SNI时服务器可能发回域名不匹配的证书,默认为false
"Timeout": null, // 请求超时时长,格式为"00:02:00",默认为null
"IPAddress": null, // 请求的ip,默认为null
"Destination": null, // 请求目的地,格式为绝对或相对Uri,默认null
"Response": { // 阻断请求直接响应,设置了Response其它配置都不起作用了
"StatusCode": 404, // 响应的状态码
"ContentType": "text/plain;charset=utf-8", // 如果有ContentValue,就要指示ContentType
"ContentValue": "这是一个用于示范配置的域名" // 自定义返回的内容,这是可选的
}
}
}
},
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Yarp": "Warning",
"System": "Warning",
"Microsoft": "Warning",
"Microsoft.AspNetCore.Server.Kestrel": "Error"
}
}
}
}
(base) kk@kk:/home/user/fastgithub_linux-x64$ ./fastgithub
2023-07-29T17:28:06.1584476+08:00 [INF]
FastGithub.HttpServer
已监听http://localhost:9527,http代理服务启动完成
2023-07-29T17:28:06.4416803+08:00 [INF]
FastGithub.AppHostedService
FastGithub启动完成,当前版本为v2.1.4,访问 https://github.com/dotnetcore/fastgithub 关注新版本
2023-07-29T17:28:07.4802346+08:00 [WRN]
FastGithub.AppHostedService
请设置系统自动代理为http://127.0.0.1:9527,或手动代理http/https为127.0.0.1:9527
songshiquan commented
省省力吧,作者已经跑路了
leafcxy commented
省省力吧,作者已经跑路了
真的假的?
irkbyxfcqjelz commented
省省力吧,作者已经跑路了
真的假的?
假的别信windows10还可以用
neillee95 commented
https://github.com/dotnetcore/FastGithub/blob/master/FastGithub.Configuration/FastGithubOptions.cs 代码文件里没有 IpAddressList
这个配置项,配置了跟没配置一样。
在监听端口时都是用的 localhost