V2EX Qist
 Qist 最近的时间轴更新
Qist

Qist

V2EX 第 531667 号会员,加入于 2021-02-02 14:55:50 +08:00
Qist 最近回复了
Ubuntu
@ellermister 几家运营商城域网没打通啊!
现在不都有 ipv6 用 v6 回去代理用就是了。
@ellermister root@OpenWrt:~# ping 119.29.29.29
PING 119.29.29.29 (119.29.29.29): 56 data bytes
64 bytes from 119.29.29.29: seq=0 ttl=55 time=30.913 ms
64 bytes from 119.29.29.29: seq=1 ttl=55 time=30.798 ms
64 bytes from 119.29.29.29: seq=2 ttl=55 time=30.455 ms 广州联通
广州 5g 打折月租 64 元,300m 带宽免费。如果自己有联通 5G 卡 可以先在联通 app 看安装加宽里面有没免费的。上面操作就可以。
@DeadLion 就是 tvbox 接口,直播就是电视直播方面的接口。
视频点播直播接口存放地方。个人博客
309 天前
回复了 techdai 创建的主题 OpenWrt OpenWRT 定制版怎么升级版本号
@msywkylemon 可以修改 先获取旧的 md5 opkg info kernel | grep 'Version' | cut -d '-' -f 3 然后修改 sed -i "s/old_kernel_md5/new_kernel_md5/g" /usr/lib/opkg/status 就可以安装了。
2024-06-13 10:21:55 +08:00
回复了 muzihuaner 创建的主题 分享创造 用 cloudflare worker 搭建一个 Docker 镜像
addEventListener("fetch", (event) => {
event.passThroughOnException();
event.respondWith(handleRequest(event.request));
});

const routes = {
"docker.域名": "https://registry-1.docker.io",
"quay.域名": "https://quay.io",
"gcr.域名": "https://gcr.io",
"k8s-gcr.域名": "https://k8s.gcr.io",
"k8s.域名": "https://registry.k8s.io",
"ghcr.域名": "https://ghcr.io",
"cloudsmith.域名": "https://docker.cloudsmith.io",
};

function routeByHosts(host) {
if (host in routes) {
return routes[host];
}
if (MODE == "debug") {
return TARGET_UPSTREAM;
}
return "";
}

async function handleRequest(request) {
let url = new URL(request.url);
const upstream = routeByHosts(url.hostname);
if (upstream === "") {
return new Response(
JSON.stringify({
routes: routes,
}),
{
status: 404,
}
);
}
if (upstream === "https://registry-1.docker.io") {
// Modify URL if necessary based on search parameters and encoded characters
if (!/%2F/.test(url.search) && /%3A/.test(url.toString())) {
let modifiedUrl = url.toString().replace(/%3A(?=.*?&)/, '%3Alibrary%2F');
url = new URL(modifiedUrl);
}

// Append 'library' to the pathname if necessary
const libraryPathPattern = /^\/v2\/[^/]+\/[^/]+\/[^/]+$/;
const libraryPrefixPattern = /^\/v2\/library/;
if (libraryPathPattern.test(url.pathname) && !libraryPrefixPattern.test(url.pathname)) {
url.pathname = url.pathname.replace(/\/v2\//, '/v2/library/');
}
}
// check if need to authenticate
if (url.pathname == "/v2/") {
const newUrl = new URL(upstream + "/v2/");
const resp = await fetch(newUrl.toString(), {
method: "GET",
redirect: "follow",
});
if (resp.status === 200) {
} else if (resp.status === 401) {
const headers = new Headers();
if (MODE == "debug") {
headers.set(
"Www-Authenticate",
`Bearer realm="${LOCAL_ADDRESS}/v2/auth",service="cloudflare-docker-proxy"`
);
} else {
headers.set(
"Www-Authenticate",
`Bearer realm="https://${url.hostname}/v2/auth",service="cloudflare-docker-proxy"`
);
}
return new Response(JSON.stringify({ message: "UNAUTHORIZED" }), {
status: 401,
headers: headers,
});
} else {
return resp;
}
}
// get token
if (url.pathname == "/v2/auth") {
const newUrl = new URL(upstream + "/v2/");
const resp = await fetch(newUrl.toString(), {
method: "GET",
redirect: "follow",
});
if (resp.status !== 401) {
return resp;
}
const authenticateStr = resp.headers.get("WWW-Authenticate");
if (authenticateStr === null) {
return resp;
}
const wwwAuthenticate = parseAuthenticate(authenticateStr);
return await fetchToken(wwwAuthenticate, url.searchParams);
}
// foward requests
const newUrl = new URL(upstream + url.pathname);
const newReq = new Request(newUrl, {
method: request.method,
headers: request.headers,
redirect: "follow",
});
return await fetch(newReq);
}

function parseAuthenticate(authenticateStr) {
// sample: Bearer realm="https://auth.ipv6.docker.com/token",service="registry.docker.io"
// match strings after =" and before "
const re = /(?<=\=")(?:\\.|[^"\\])*(?=")/g;
const matches = authenticateStr.match(re);
if (matches === null || matches.length < 2) {
throw new Error(`invalid Www-Authenticate Header: ${authenticateStr}`);
}
return {
realm: matches[0],
service: matches[1],
};
}

async function fetchToken(wwwAuthenticate, searchParams) {
const url = new URL(wwwAuthenticate.realm);
if (wwwAuthenticate.service.length) {
url.searchParams.set("service", wwwAuthenticate.service);
}
if (searchParams.get("scope")) {
url.searchParams.set("scope", searchParams.get("scope"));
}
return await fetch(url, { method: "GET", headers: {} });
}
2023-02-16 09:18:59 +08:00
回复了 Mr0C 创建的主题 问与答 如何提高和异性聊天的能力?
开好车,根本不需要你会啥沟通。或者进入一家大企业随时无意发些朋友圈,脉脉圈,送上门的很多。
关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     821 人在线   最高记录 6679       Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 60ms UTC 21:36 PVG 05:36 LAX 14:36 JFK 17:36
Do have faith in what you're doing.
ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86