This is a script based on the Cloudflare Worker platform. Based on the original version, it is modified to display Trojan configuration information and convert it into subscription content. Using this script, you can easily convert Trojan configuration information to tools such as Clash or Singbox using online configuration.
- Workers deployment method
- Pages deployment method
- proxyIP
- Environment Variable description
- Video tutorials
Use
- This project is designed and developed for learning, research and safety testing purposes only. It aims to provide security researchers, academics and technology enthusiasts with a tool to understand and practice network communication technology.
Legality
- Users must comply with local laws and regulations when downloading and using this project.
- Users are responsible for ensuring that their actions comply with the laws, regulations and other applicable requirements of their region
Risk warning
- Avoid leaking node configuration information by submitting false node configurations to the subscription service- Deploy Cloudflare Worker:
-
Create a new Worker in the Cloudflare Worker console.
-
Will worker.js Paste the contents into the Worker editor.
-
Change line 3
password
Modify it to your own password -
Alternatively, you can click the button below to deploy directly.
-
-
Add preferred route:
- Give
addresses
Add the preferred domain name/preferred clean IP according to the format. If there is no port number, the default TLS port is 443, and the # sign is the remark alias, for example:let addresses = [ // Everything you want, Cloudflare Domains & Clean IP addresses. 'www.speedtest.net:443#Ni1', 'sky.rethinkdns.com#Ni2', 'creativecommons.org#Ni3', 'time.cloudflare.com:2053#Ni4', ];
- Give
-
Access subscription content:
- access
https://[YOUR-WORKERS-URL]/[password]
Get subscription content. - For example
https://vless.trauma.workers.dev/auto
This is your universal adaptive subscription address. - For example
https://vless.trauma.workers.dev/auto?sub
Base64 subscription format, suitable for PassWall, SSR+, etc. - For example
https://vless.trauma.workers.dev/auto?clash
Clash subscription format, suitable for OpenClash, etc. - For example
https://vless.trauma.workers.dev/auto?sb
singbox subscription format, suitable for singbox, etc.
- access
-
Bind a custom domain to workers:
- In the workers console
trigger
tab, click belowAdd a custom domain
。 - Fill in the secondary domain name that you have transferred to the CloudFlare domain name resolution service, for example:
vless.trauma.com
After clickAdd a custom domain
, just wait for the certificate to take effect.
- In the workers console
-
Deploy Cloudflare Pages:
- Fork this project on Github
- Select in the Cloudflare Pages console
Connected to Git
After that, selecttrauma
Click after the itemStart setting up
。 - exist
Setting up build and deployment
At the bottom of the page, selectEnvironment variables (advanced)
merge later Add variables, - Fill in the variable name PASSWORD , the value is your password, then click
Save and deploy
That’s it.
-
Add preferred route:
- Add variables
ADD
Local static preferred line, if there is no port number, the default TLS port is 443, and the # number is followed by a remark alias, for example:discord.com#You can just put the domain name as follows www.speedtest.net:443#Ni1 speed.cloudflare.com#Ni2 zula.ir#Ni3 creativecommons.org:2053#Ni4 sky.rethinkdns.com#NI5 104.17.152.41#IPv4 is available [2606:4700:e7:25:4b9:f8f8:9bfb:774a]#also IPv6
- Add variables
-
Access subscription content:
- access
https://[YOUR-PAGES-URL]/[password]
Subscription content is available. - For example
https://trauma.pages.dev/auto
This is your universal adaptive subscription address. - For example
https://trauma.pages.dev/auto?sub
Base64 subscription format, suitable for PassWall, SSR+, etc. - For example
https://trauma.pages.dev/auto?clash
Clash subscription format, suitable for OpenClash, etc. - For example
https://trauma.pages.dev/auto?sb
singbox subscription format, suitable for singbox, etc.
- access
-
Bind CNAME custom domain to Pages:
- In the Pages console
Custom domains
tab, click belowSet up a custom domain
. - Fill in your custom secondary domain name, be careful not to use your root domain name, for example:
- The domain name you are assigned is
fuck.cloudns.biz
, then add a custom field to fill iniran.fuck.cloudns.biz
That’s it; - According to Cloudflare's requirements, your domain name DNS service provider will be returned and the custom domain will be added.
trauma
CNAME record oftrauma.pages.dev
After that, clickActivate Domain
That’s it.
- In the Pages console
-
When deploy in cloudflare pages, you can set proxyIP in 4th line of
_worker.js
file. or set environment variable, variable name isPROXYIP
-
When deploy in worker.dev, you can set proxyIP in 4th line of
_worker.js
file. or set environment variable, variable name isproxyIP
Note
Only set two of them is sufficient, the first variable PASSWORD
and the second PROXYIP
, variables listed in the table below are only for educational purposes and additional explanations.
variable name | Example | Remark |
---|---|---|
PASSWORD | auto | Can take any value |
PROXYIP | click here or Use ni.radically.pro |
Alternative proxy node for accessing CFCDN sites (supports multiple ProxyIPs, with ,1 or 2 line breaks between ProxyIPs)) |
ADD | zula.ir,www.csgo.com:2087 | Local preferred domain name/preferred IP (supports multiple elements, or line feed as interval) |
ADDAPI | https://raw.githubusercontent.com/NiREvil/Trauma/main/cleanIPs.txt | No need to explain, everyone understands |
SUBAPI | apiurl.v1.mk | clash, singbox, etc. subscription conversion backend |
SUBNAME | REvil | Subscription name |
Fork.and.deploy.cloudfare.Pages.dev.mp4
Set.Environment.variables.mp4
Get.config.-.subscription.link.and.test.ip.mp4
proxyIP.env.replacement.and.retry.deployment.mp4
ca110us | Sterilize it | zizifn | Yemen 178 | ACL4SSR | Shegs1999