-
Notifications
You must be signed in to change notification settings - Fork 2k
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
是否可以增加配置来限制为只支持某些 GitHub org #41
Comments
改项目里面的regex |
没有很好的配置模板,最好的就是regex,所以直接改代码吧... |
直接修改代码肯定能做到,不过,要是有个配置文件,大家在使用的时候就更方便了 |
因为规则I比较复杂,项目内也是用正则表达式实现的,就是里面的regex1~5,不太需要代码能力,就当做配置吧
Rick ***@***.***> 于2021年9月9日周四 下午4:06写道:
… 直接修改代码肯定能做到,不过,要是有个配置文件,大家在使用的时候就更方便了
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#41 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACZDQS7EV7CAOFJUGCR32Z3UBBTIZANCNFSM5DWQ2XQQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
我在火上加个油吧... |
黑名单好像确实有需求,晚上我改改.......
Stille ***@***.***> 于2021年9月9日周四 下午6:57写道:
… 我在火上加个油吧...
大佬直接开发个黑白名单好了....手动狗头
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#41 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACZDQS6UEESW5RFIHPAW2F3UBCHLNANCNFSM5DWQ2XQQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
看是否可以直接将黑名单里的链接301到 cnpmjs 和 jsDelivr 上去比较合理 我目前是配置nginx来将一些仓库301到了cnpmjs 和 jsDelivr 上去了...不影响使用也不会太占本机网络资源 |
问下这个黑白名单可否一起用?每行一个? 能否详细点? |
可以的可以同时生效
***@***.***的需求,仅放行指定仓库/用户
黑名单是你的需求,不过这个是直接封禁
如果是部分要走cnpmjs或者jsdelivr的话,用pass_list,这个名单里的仓库无视cnpmjs的那个设置
Stille ***@***.***> 于2021年9月9日周四 下午11:00写道:
… 问下这个黑白名单可否一起用?每行一个? 能否详细点?
white_list = '''
'''
back_list = '''
'''
pass_list = '''
'''
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#41 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACZDQS3ULHKY6KH2RPBFMVDUBDDZRANCNFSM5DWQ2XQQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
当white_list 设置了 abc/def 当不设置 white 对了 back_list 错了吧? 应该是 black_list? |
比如 white_list = '''
hunshcn
''''
black_list = '''
hunshcn/repo1
hunshcn/repo2
'''
pass_list = '''
hunshcn/repo100
''''
这样就是只有hunshcn拥有的仓库和所有gist可以被访问,其他被403
不过`hunshcn/repo1`和`repo2`会被403
`repo100`会302到cnpmjs |
生效顺序 |
OK 了解 |
测试了下发现并没有生效 pass_list |
不是所有的内容都能302,比如release和gist,cnpmjs和jsdelivr都没有,没有地方302跳过去。
这算是featrue吧
pass list能够达到的效果只是让匹配的内容会忽略cnpmjs和jsdelivr设置
Stille ***@***.***> 于2021年9月9日周四 下午11:48写道:
… 测试了下发现并没有生效 pass_list
在chrome上访问还是跳转到 https://ghproxy.com/https://github.com/xxx/xxx
查看日志偶尔有302的,但是紧接着又一条200的
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#41 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACZDQSYZUNSJBEA2G3JKVE3UBDJMXANCNFSM5DWQ2XQQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
docker里面怎么设置呢? |
有了这个限制配置的话,对于一些私有部署的用户而言,就可以避免流量吞没的情况,而达到只支持和他们相关的项目。
The text was updated successfully, but these errors were encountered: