Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto generate script for all in one configs #145

Merged
merged 5 commits into from
Apr 13, 2023
Merged

Conversation

bghandchi
Copy link
Contributor

A script to automatically make the necessary changes to the files in the All in one fallbacks NGINX folder.
Feature:

  • Modifies all files automatically.
  • Generates short links for all configs
  • Generates one base64 string for all configs
  • Generates separate qr codes for all configs

@yuhan6665 yuhan6665 merged commit 004c490 into XTLS:main Apr 13, 2023
@yuhan6665
Copy link
Member

Fancy. Thanks for your work!

@FranzKafkaYu
Copy link

@bghandchi Fantastic work, well done!

@bghandchi
Copy link
Contributor Author

Thank you for merging :)

@wlfvpn
Copy link
Contributor

wlfvpn commented Apr 22, 2023

@bghandchi why did you change the path for ?ed=2048 . This is to use 0RTT

@bghandchi
Copy link
Contributor Author

@wlfvpn this is actually a mistake from my side. I was making some small changes in my fork. This change was after the pr. Didn't realize it ll automatically included in pr. We can change it back.

@bghandchi
Copy link
Contributor Author

The real reason behind these small changes for me was that the short urls for configs were all okay for Android but there were problems for iOS. I was removing and changing parts of the configs urls to find out what the problem is.

@bghandchi
Copy link
Contributor Author

Before you ask, you may be interested in knowing why I commented out the H2 and TCP configs. The reason is when the domains are behind a cdn eg Cloudflare, those configs won't connect. If the DNS is not proxied in Cloudflare they work perfectly.

@wlfvpn
Copy link
Contributor

wlfvpn commented Apr 22, 2023

@bghandchi Thanks for clarification. I would still recommend adding ?ed=2048 to the path to optimize 0RTT and also based on :
https://github.com/chika0801/Xray-examples/blob/main/warning.md

Handshake: The WS in the inner layer of WSS needs to shake hands once more, and the timing characteristics are very unique. In fact, opening XTLS/Xray-core#375 can alleviate the problem. If you have to use WSS, it is recommended?ed=2048

to avoid detection. I should mention the 0RTT should also be activated from the cloudflare CDN to get the benefit.

@Saoshyanet
Copy link
Contributor

What you should also consider is that the URL format in the previous notes was wrong, I suggest that you pass them through v2rayNG and export them to get the correct URL format. For example the address should not contain "?" or "=" in the values of fields i.e "?path=/vlws?ed=2048" is wrong and "?path=%2Fvlws%3Fed%3D2048" is correct.

@Saoshyanet
Copy link
Contributor

Saoshyanet commented Apr 22, 2023

One other note: You can also simplify the usage of sed for the users by using "#" notation in sed, that is, instead of
export main_domain_crt="\/path\/to\/main\/domain\/fullchain.pem" # Change this to the correct value we could have
export main_domain_crt="/path/to/main/domain/fullchain.pem" # Change this to the correct value if we use the following sed notations: sed -i "s#find#replace#g"

@bghandchi
Copy link
Contributor Author

Good points. I'll make some changes and make a new pr. As for the usage of sed I agree it can be done better. My plan was to it properly with jq and directly manipulate the jason. This way something like extra domain names can be supported easily. In the meantime anybody has any idea why the TCP and H2 configs won't work when the domain is proxied behind Cloudflare?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants