yonggekkk / Cloudflare_vless_trojan

Cloudflare代理脚本,支持workers与pages两种形式部署,实现Vless与Trojan两种协议。CF优选域名、优选官方IP反代IP多平台一键脚本
3.15k stars 2.1k forks source link

如何实现 trojan 和 vless 的同时部署 #83

Closed creeperCN closed 1 month ago

creeperCN commented 1 month ago

在 cf 上只能部署其中一个协议,请问如何同时部署

yonggekkk commented 1 month ago

你指一个项目共存两个协议?。。。目前只能一个项目一个协议

creeperCN commented 1 month ago

2024-05-09T14:25:16.248296Z Cloning repository... 2024-05-09T14:25:18.168232Z From https://github.com/creeperCN/Cloudflare-workers-pages-vless 2024-05-09T14:25:18.168643Z * branch 5f9f55ebc2e1d680dcc1092fd2426012695d8b06 -> FETCH_HEAD 2024-05-09T14:25:18.168801Z 2024-05-09T14:25:18.230571Z HEAD is now at 5f9f55e Merge branch 'yonggekkk:main' into main 2024-05-09T14:25:18.231031Z 2024-05-09T14:25:18.314576Z 2024-05-09T14:25:18.315038Z Using v2 root directory strategy 2024-05-09T14:25:18.352033Z Success: Finished cloning repository files 2024-05-09T14:25:19.958791Z Checking for configuration in a wrangler.toml configuration file (BETA) 2024-05-09T14:25:19.95938Z
2024-05-09T14:25:20.041064Z No wrangler.toml file found. Continuing. 2024-05-09T14:25:20.11843Z No build command specified. Skipping build step. 2024-05-09T14:25:20.119337Z Found _worker.js in output directory. Uploading. 2024-05-09T14:25:21.06752Z ✘ [ERROR] 2 error(s) and 1 warning(s) when compiling Worker. 2024-05-09T14:25:21.068048Z 2024-05-09T14:25:21.068164Z 2024-05-09T14:25:21.071231Z 2024-05-09T14:25:21.072819Z ✘ [ERROR] Could not resolve "crypto" 2024-05-09T14:25:21.072976Z 2024-05-09T14:25:21.073332Z _worker.js:530:25: 2024-05-09T14:25:21.073504Z  530 │ var crypto = require('crypto') 2024-05-09T14:25:21.073646Z ╵ ~~~~ 2024-05-09T14:25:21.073767Z 2024-05-09T14:25:21.073873Z The package "crypto" wasn't found on the file system but is built into node. 2024-05-09T14:25:21.074023Z Add the "nodejs_compat" compatibility flag to your Pages project and make sure to prefix the module name with "node:" to enable Node.js compatibility. 2024-05-09T14:25:21.074175Z 2024-05-09T14:25:21.074352Z 2024-05-09T14:25:21.074464Z ✘ [ERROR] Could not resolve "buffer" 2024-05-09T14:25:21.074574Z 2024-05-09T14:25:21.074672Z _worker.js:531:25: 2024-05-09T14:25:21.074778Z  531 │ var Buffer = require('buffer').Buffer; 2024-05-09T14:25:21.074999Z ╵ ~~~~ 2024-05-09T14:25:21.075101Z 2024-05-09T14:25:21.075288Z The package "buffer" wasn't found on the file system but is built into node. 2024-05-09T14:25:21.075383Z Add the "nodejs_compat" compatibility flag to your Pages project and make sure to prefix the module name with "node:" to enable Node.js compatibility. 2024-05-09T14:25:21.075517Z 2024-05-09T14:25:21.075667Z 2024-05-09T14:25:21.075749Z ▲ [WARNING] The CommonJS "module" variable is treated as a global variable in an ECMAScript module and may not work as expected [commonjs-variable-in-esm] 2024-05-09T14:25:21.076026Z 2024-05-09T14:25:21.076162Z _worker.js:963:4: 2024-05-09T14:25:21.076304Z  963 │ module.exports = exports; 2024-05-09T14:25:21.076444Z ╵ ~~ 2024-05-09T14:25:21.07656Z
2024-05-09T14:25:21.076663Z This file is considered to be an ECMAScript module because of the "export" keyword here: 2024-05-09T14:25:21.076761Z 2024-05-09T14:25:21.076854Z _worker.js:367:0: 2024-05-09T14:25:21.076988Z  367 │ export { 2024-05-09T14:25:21.077148Z ╵ ~~ 2024-05-09T14:25:21.077294Z 2024-05-09T14:25:21.077404Z 2024-05-09T14:25:21.077595Z ✘ [ERROR] Build failed with 2 errors: 2024-05-09T14:25:21.077711Z 2024-05-09T14:25:21.077826Z _worker.js:530:25: ERROR: Could not resolve "crypto" 2024-05-09T14:25:21.077929Z _worker.js:531:25: ERROR: Could not resolve "buffer" 2024-05-09T14:25:21.078048Z 2024-05-09T14:25:21.078142Z 2024-05-09T14:25:21.080279Z 🪵 Logs were written to "/root/.config/.wrangler/logs/wrangler-2024-05-09_14-25-20_770.log" 2024-05-09T14:25:21.090962Z Failed building Pages Functions. 2024-05-09T14:25:21.9374Z Failed: generating Pages Functions failed. Check the logs above for more information. If this continues for an unknown reason, contact support: https://cfl.re/3WgEyrH

yonggekkk commented 1 month ago

视频教程明天更新

creeperCN commented 1 month ago

视频教程明天更新

谢谢你(^🙏^)

yonggekkk commented 1 month ago

github方式部署pages没试过。目前都是本地部署的

creeperCN commented 1 month ago

GitHub 方式部署页面没试过。目前都是本地部署的

你能试一下吗,项目更新的时候还要本地打包太麻烦了

yonggekkk commented 1 month ago

GitHub 方式部署页面没试过。目前都是本地部署的

你能试一下吗,项目更新的时候还要本地打包太麻烦了

除非像上回的1101事件,不然也没什么好更新的。这东西一出来就是完全体。。。

creeperCN commented 1 month ago

GitHub 方式部署页面没试过。目前都是本地部署的

你能试一下吗,项目更新的时候还要本地打包太麻烦了

除非像上回的1101事件,不然也没什么好更新的。这东西一出来就是完全体。。。

您能尝试一下通过 GitHub 部署吗

yonggekkk commented 1 month ago

GitHub 方式部署页面没试过。目前都是本地部署的

你能试一下吗,项目更新的时候还要本地打包太麻烦了

除非像上回的1101事件,不然也没什么好更新的。这东西一出来就是完全体。。。

您能尝试一下通过 GitHub 部署吗

不考虑第三方引入了,除非没办法