Add support for HApp subscription URLs - #1205
Conversation
|
@handsomeji I added such PR. Could you review it? |
|
Synced with latest upstream. @handsomeji Could you review it? |
|
Sorry, I don't plan to merge this PR. This commit uses a third-party API for parsing. And this feature requirement is not in the plan. |
|
@handsomeji I understand that the current PR is not acceptable because it relies on a third-party API and HApp support is currently not in the plan. Before I proceed with any changes, could you please clarify the preferred direction? Would any of the following approaches be acceptable?
Which of these directions, if any, would be acceptable for PassWall2? |
Summary
Add support for HApp subscription URLs in PassWall2.
Some VPN services provide subscription links in the
happ://crypt*format, which cannot be downloaded directly by PassWall2 as a regular HTTP/HTTPS URL.This change adds transparent preprocessing for HApp subscription URLs:
happ://crypt*, PassWall2 sends it to the HApp resolver API.direct,proxy, orauto).Regular
http://andhttps://subscription URLs are handled exactly as before.Implementation
The HApp URL preprocessing is implemented in
subscribe.luaand integrated into the existingcurl()subscription download path.The resolver uses the existing PassWall2 API functions:
api.curl_direct()api.curl_proxy()api.curl_auto()This ensures that resolving an HApp subscription follows the same network access mode as downloading the resulting subscription.
Testing
Tested with a real HApp
happ://crypt4/...subscription URL.Verified that:
Related to #1167.