Verify Steps
Describe the Feature
Problem
Some panels require a custom request header when fetching the subscription. For example,
Remnawave's "HWID Device Limit" needs an x-hwid header — without it the panel returns a
placeholder config ("App not supported" node) instead of the real nodes, so Config Subscribe
can't be used against such a panel.
OpenClash lets me set a custom User-Agent (sub_ua), but there is no way to add arbitrary
request headers.
Where
luci-app-openclash/root/usr/share/openclash/openclash_curl.sh → DOWNLOAD_FILE_CURL()
hardcodes the request headers. Only these are ever sent:
curl ... -H "User-Agent: ${DOWNLOAD_UA}" \
-H "X-Age-Public-Key: ${SECRET_KEY}" \
-H "$ETAG_HEADER" "$DOWNLOAD_URL" -o ...
There is no hook to add e.g. x-hwid.
Request
An optional per-subscription "Custom headers" field (free-form Name: value lines) that
DOWNLOAD_FILE_CURL forwards to curl via -H. That is enough to send x-hwid (plus optional
x-device-os / x-device-model / ...), which makes OpenClash work with HWID-limited
subscriptions.
Note: mihomo already supports a header field on proxy-providers / rule-providers; this
request only adds the same capability to the config/subscription fetch itself.
Describe Alternatives
Current workaround: a cron job that curls the subscription with the required header and writes
the result to the config file, instead of using OpenClash's own Config Subscribe. This works but
it's clearly something the client should be able to do natively.
Verify Steps
Describe the Feature
Problem
Some panels require a custom request header when fetching the subscription. For example,
Remnawave's "HWID Device Limit" needs an
x-hwidheader — without it the panel returns aplaceholder config ("App not supported" node) instead of the real nodes, so Config Subscribe
can't be used against such a panel.
OpenClash lets me set a custom
User-Agent(sub_ua), but there is no way to add arbitraryrequest headers.
Where
luci-app-openclash/root/usr/share/openclash/openclash_curl.sh→DOWNLOAD_FILE_CURL()hardcodes the request headers. Only these are ever sent:
There is no hook to add e.g.
x-hwid.Request
An optional per-subscription "Custom headers" field (free-form
Name: valuelines) thatDOWNLOAD_FILE_CURLforwards to curl via-H. That is enough to sendx-hwid(plus optionalx-device-os/x-device-model/ ...), which makes OpenClash work with HWID-limitedsubscriptions.
Note: mihomo already supports a
headerfield onproxy-providers/rule-providers; thisrequest only adds the same capability to the config/subscription fetch itself.
Describe Alternatives
Current workaround: a cron job that
curls the subscription with the required header and writesthe result to the config file, instead of using OpenClash's own Config Subscribe. This works but
it's clearly something the client should be able to do natively.