Comments (3)
这几个文件的情况各不相同,isoinfo.json 是有脚本在定时生成,脚本在 https://github.com/tuna/mirror-web/blob/master/geninfo/genisolist.py
tunasync.json 由 nginx 反代给 tunasync 的 manager,由 manager 产生输出,相关代码在 https://github.com/tuna/tunasync/blob/master/manager/status.go
tunet.json 直接由 nginx 产生,本意是用于判断用户是否在校园网内,却访问了镜像站校园网外的 IP 地址;如果是,则在前端产生提醒,提醒用户防止产生过多流量。目前该功能已经废除,因为镜像站已经没有校园网外的地址了。相关代码如下:
geo $ipwhitelist {
default 1;
127.0.0.0/8 0;
172.18.0.0/16 0;
166.111.0.0/16 0;
59.66.0.0/16 0;
101.5.0.0/16 0;
101.6.0.0/16 0;
183.172.0.0/16 0;
183.173.0.0/16 0;
118.20.0.0/20 0;
:: 0;
}
map $ipwhitelist $limit {
1 $binary_remote_addr;
0 "";
}
limit_conn_zone $limit zone=limit:10m;
location = /static/tunet.json {
return 200 "false";
# F**k nginx does not support nested if nor "and" "or" "else" "not"
# Halt! Magic here! Don't Touch!
# set $outer "0";
# if ($limit) {
# set $outer 1;
# }
# set $insider_out "0";
# if ($server_addr = "202.112.3.6") {
# set $insider_out "1+${outer}";
# }
# if ($insider_out = "1+0") {
# return 200 "true";
# }
# return 200 "false";
}
from mirror-web.
tunasync.json 其实是tunasync管理器的manager提供的一个接口,接口地址为 http://manager:listenport
>/jobs。
接口作用及接口名称查看 https://github.com/tuna/tunasync/blob/master/manager/server.go 。
生成tunasync.json的代码,查看 https://github.com/tuna/tunasync/blob/master/internal/status_web.go
from mirror-web.
我猜是服务器端一些脚本生成的。
from mirror-web.
Related Issues (20)
- Suggestion: mention `pushy_https` in the help of CPAN mirror HOT 4
- AOSP 帮助文档中 wget 下载在校外会 404 HOT 2
- router bug HOT 1
- The mirror-web cannot display the mirror page,It may be because of nginx configuration HOT 2
- debian security源地址仍然写的原来的地址 HOT 1
- mirror-web怎样和tunasync后端对接? HOT 4
- 建议支持‘/’键聚焦搜索框
- 网站服务状态页面png图片,采用什么监控软件,及图片是如何生产 HOT 5
- 修改debian镜像的帮助文档需要更新 HOT 3
- cdn.jsdelivr.net无法访问
- Add RSS support for news. HOT 2
- 子目录的url与status该如何显示 HOT 16
- disk.json与isoinfo.json的数据不传入 HOT 6
- isoinfo.json写入数据后浏览器报错 HOT 3
- 关于子目录样式调用问题 HOT 2
- 建议提供适用于Docker-Compose配置文件 HOT 1
- Openmediavault的使用帮助需要更新 HOT 1
- ubuntu help 页面应当更新 Ubuntu 24.04 LTS HOT 2
- 建议添加geninfo/genisolist.ini配置文件编辑指引 HOT 7
- 编译出现问题 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mirror-web.