sub-store-org / Sub-Store

Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket!
https://www.notion.so/Sub-Store-6259586994d34c11a4ced5c406264b46
GNU Affero General Public License v3.0
5.36k stars 589 forks source link

When converting from another form to Quantumul X, the default method value is none (type vmess) #79

Closed kingsman1112 closed 2 years ago

kingsman1112 commented 2 years ago

When I convert another form to Quantumult X form, it makes the parameter value in node become method=none, it makes the button inactive, so it must be method=chacha20-ietf-poly1305 for it to work motion Can Sub-Store change parameter values ​​on buttons located in the subscription link? for example I use Quantumult X then I want to change the value of method=none to method=chacha20-ietf-poly1305 or obfs-host=abc to obfs-host=xyz ?

Peng-YM commented 2 years ago

I don't quite understand your description. What did you mean by "it makes the button inactive"?

kingsman1112 commented 2 years ago

method=none in type vmess the server will not work

Peng-YM commented 2 years ago

Thanks for reporting, I will investigate this issue when I find the time.

kingsman1112 commented 2 years ago

yes big man

kingsman1112 commented 2 years ago

i have read the issue before and the error i am describing in the first paragraph is the same as the problem: vmess 节点 的 加密 类型 被 改成 none # 78 created by EpiphanyCat

Peng-YM commented 2 years ago

Could you provide an example that can reproduce this issue? You can copy one node from the original subscription.

kingsman1112 commented 2 years ago

Initially the node is the form of Shadowrocket, V2ray, Clash, ... If linking with the Sub-Store to convert directly to the form of Quantumult X, the node in the registration link will be defaulted to the encryption parameter value of no such (method=none) makes the node inactive. If it was originally a form of Quantumult X, then the registration link is normal because the encryption method has an encrypted value parameter, the encryption method is no longer empty (method=chacha20-ietf-poly1305). I think the admin just need to give the option to specify the encoding type or not for the encrypted value (method=...). Can admin add the option to change the node's value parameter in the initial link? For example change the value of obfs-host of the original link from obfs-host=abc then I want to change it to obfs-host=xyz

Peng-YM commented 2 years ago

You can always change any attributes of a node by using the Script Operator (“脚本操作”)。 For example, change the encryption to "chacha20-ietf-poly1305":

function operator(proxies) {
    proxies.forEach(p => {
        p.cipher = "chacha20-ietf-poly1305";
    });
}
kingsman1112 commented 2 years ago

Do you have a website that introduces script operators? I want to see an example of changing obfs-host

Peng-YM commented 2 years ago

Unfortunately, there is no documentation at the moment :(. This is because the script operator is too flexible, I don't want to expose too many implementation details. If you want to change the obfs-host for VMess WebSocket, you can use the following:

function operator(proxies) {
    proxies.forEach(proxy => {
        proxy.sni = "xyz";
    });
}
kingsman1112 commented 2 years ago

i tried it before but it didn't work, obfs-host didn't change

Peng-YM commented 2 years ago

i tried it before but it didn't work, obfs-host didn't change

Could you please provide a screenshot? A kind reminder, you should not use the link mode for the Script Operator.

kingsman1112 commented 2 years ago

B9F4A68F-6ED6-43EF-B600-C16E347C70C1

kingsman1112 commented 2 years ago

1E5D6035-14B6-4869-9B0D-9E7F09D7DE02

kingsman1112 commented 2 years ago

cipher has changed but obfs-host has not changed

Peng-YM commented 2 years ago

Try this instead:

function operator(proxies){
    proxies.forEach(p => {
        p["ws-opts"] = p["ws-opts"] || {"headers": {}};
        p["ws-opts"].headers = {
                "Host": "abc"
        };
    });
}
kingsman1112 commented 2 years ago

Error updating registration link in Quantumult X: “Response invalid”

Peng-YM commented 2 years ago

Sorry I made a mistake, please try the modified code above.

kingsman1112 commented 2 years ago

still error: “Response invalid” I see "ws-obts=0"

48F5571C-704E-46E6-AB6F-D88A1292460E

kingsman1112 commented 2 years ago

Hello