Open zxlhhyccc opened 1 month ago
大佬,问题找到了,是KV命名空间绑定不生效导致订阅链接无法转换,我已提pr,请合并。 https://github.com/jwyGithub/subconverter-cloudflare/pull/10 效果如图:
大佬,问题找到了,是KV命名空间绑定不生效导致订阅链接无法转换,我已提pr,请合并。 #10 效果如图:
原kv绑定的代码逻辑无法转换https远端订阅,你这个错误应该是别的原因引起的,如果你是通过worker部署的,可以在对应worker的日志里面查看错误原因,或者提供一个测试url给我,我来排查下
@jwyGithub 日志:
Exception
GET
https://subconverter-cloudflare.zxlhhy.workers.dev/sub?target=clash&new_name=true&url=https%3A%2F%2Fdler.cloud%2Fsubscribe%REDACTED%3Fmu%3Dss&insert=false&config=https%3A%2F%2Fraw.githubusercontent.com%2FACL4SSR%2FACL4SSR%2Fmaster%2FClash%2Fconfig%2FACL4SSR_Online.ini
2024/7/30 20:04:47
{
"truncated": false,
"outcome": "exception",
"scriptVersion": {
"id": "9933e38f-47fe-4d89-8bce-b25da00202d0"
},
"scriptName": "subconverter-cloudflare",
"diagnosticsChannelEvents": [],
"exceptions": [
{
"stack": " at Object.fetch (worker.js:5855:38)",
"name": "TypeError",
"message": "Cannot read properties of undefined (reading 'put')",
"timestamp": 1722341089228
}
],
"logs": [],
"eventTimestamp": 1722341087311,
"event": {
"request": {
"url": "https://subconverter-cloudflare.zxlhhy.workers.dev/sub?target=clash&new_name=true&url=https%3A%2F%2Fdler.cloud%2Fsubscribe%REDACTED%3Fmu%3Dss&insert=false&config=https%3A%2F%2Fraw.githubusercontent.com%2FACL4SSR%2FACL4SSR%2Fmaster%2FClash%2Fconfig%2FACL4SSR_Online.ini",
"method": "GET",
"headers": {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
"accept-encoding": "gzip, br",
"accept-language": "zh-CN,zh;q=0.9",
"cf-connecting-ip": "74.48.107.55",
"cf-ipcountry": "US",
"cf-ray": "8ab53693ab2452a1",
"cf-visitor": "{\"scheme\":\"https\"}",
"connection": "Keep-Alive",
"host": "subconverter-cloudflare.zxlhhy.workers.dev",
"priority": "u=0, i",
"sec-ch-ua": "\"Not)A;Brand\";v=\"99\", \"Google Chrome\";v=\"127\", \"Chromium\";v=\"127\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"Windows\"",
"sec-fetch-dest": "document",
"sec-fetch-mode": "navigate",
"sec-fetch-site": "cross-site",
"sec-fetch-user": "?1",
"upgrade-insecure-requests": "1",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36",
"x-forwarded-proto": "https",
"x-real-ip": "74.48.107.55"
},
"cf": {
"longitude": "-118.24410",
"httpProtocol": "HTTP/3",
"tlsCipher": "AEAD-AES128-GCM-SHA256",
"continent": "NA",
"asn": 35916,
"clientAcceptEncoding": "gzip, deflate, br, zstd",
"country": "US",
"verifiedBotCategory": "",
"tlsClientAuth": {
"certIssuerDNLegacy": "",
"certIssuerSKI": "",
"certSubjectDNRFC2253": "",
"certSubjectDNLegacy": "",
"certFingerprintSHA256": "",
"certNotBefore": "",
"certSKI": "",
"certSerial": "",
"certIssuerDN": "",
"certVerified": "NONE",
"certNotAfter": "",
"certSubjectDN": "",
"certPresented": "0",
"certRevoked": "0",
"certIssuerSerial": "",
"certIssuerDNRFC2253": "",
"certFingerprintSHA1": ""
},
"tlsExportedAuthenticator": {
"clientFinished": "002bb19ec4ab7601c63c23cf24c8f2cf0b999c41ec93cd6256fa8541ddd6e16c",
"clientHandshake": "0418a1bf90ad0c2612c4c5e41fe62963e80aac175b121091a293bf4b73ff94a8",
"serverHandshake": "9462ad9b09956062a8c458f73d3e55297a17aeff9496a5e3cedda8bffb814f72",
"serverFinished": "37037a587bed2f921f93ee11798fdeb9804e8b4a98aaf6c367d130f79ed254ca"
},
"tlsVersion": "TLSv1.3",
"city": "Los Angeles",
"timezone": "America/Los_Angeles",
"colo": "LAX",
"tlsClientHelloLength": "1812",
"edgeRequestKeepAliveStatus": 1,
"postalCode": "90060",
"region": "California",
"latitude": "34.05440",
"requestPriority": "",
"regionCode": "CA",
"asOrganization": "Multacom Corporation",
"metroCode": "803",
"tlsClientExtensionsSha1": "hgmcLwvf5LBt4B8yeZ6NqI7Wu7Q=",
"tlsClientRandom": "xXAN0waRqBV+Gukf1suXHpALWOKF8BytDDgZFUuI7yg="
}
},
"response": {
"status": 500
}
},
"id": 2
}
修改了5787行就正常,所以还是KV命名空间绑定出了问题,实际没绑定KV命名空间导致了问题:
@jwyGithub 你试试:https://test1.zxlhhy.workers.dev/
https://github.com/jwyGithub/subconverter-cloudflare/blob/main/_worker.js#L5855 就是KV命名空间绑定问题。
@jwyGithub 你试试:https://test1.zxlhhy.workers.dev/
https://github.com/jwyGithub/subconverter-cloudflare/blob/main/_worker.js#L5855 就是KV命名空间绑定问题。
我测试了使用不同的订阅链接进行转换,有的无法转换,有的可以转换,如果可以的话,是否可以提供你的订阅链接给我进行调试?可以发我邮箱jiangweiye@outlook.com ,另外使用https://sub.visitor-vps.cloudns.ch/这个转换地址是否可以转换?
@jwyGithub 订阅链接已发你邮箱:jiangweiye@outlook.com
@jwyGithub 很诡异,现在有出现这个错误
@jwyGithub 订阅链接已发你邮箱:jiangweiye@outlook.com
我用你的订阅链接在新部署的worker中是可以解析成功的 https://bitter-smoke-d7af.visitor-worker.workers.dev/,你可以自己测试下
@jwyGithub 很诡异,现在有出现这个错误
你的url不是一个正确的订阅url
你的url不是一个正确的订阅url
这个订阅url我使用其他订阅转换地址能正常订阅转换
你的url不是一个正确的订阅url
这个订阅url我使用其他订阅转换地址能正常订阅转换
url=asd%7C
???
我用你的订阅链接在新部署的worker中是可以解析成功的
那就很奇怪,为何我在worker部署的无法解析?请问你KV命名空间是怎么配置的?
你的url不是一个正确的订阅url
这个订阅url我使用其他订阅转换地址能正常订阅转换
url=asd%7C
???
我使用我发你的订阅url也是一样的错误。。。难道和网络有关系?
贴下你的worker环境变量配置 或者重新部署worker
我部署了无数次就是不行,请大佬看看哪里没配置好:
SUB_BUCKET是环境变量
你要在环境变量中配置SUB_BUCKET,然后值是kv命名空间的变量名称,对照下面修改
晚上我重新部署试试。不过为何不按我提的pr处理呢,这样不是更简单吗?
@jwyGithub 大佬,我重新部署了worker且按照你说的重新配置了环境变量,但非常诡异,worker部署的就是无法解析订阅url,而page部署的就正常解析订阅url。
大佬,我估计是找到原因了,可能是搞了多个订阅转换有冲突,需要域名处理。