You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we have Settings/Headers template for each Transport of different Client Cores (Thanks to M03ED)
We can have multiple Settings for each transport in the Settings Template, and from GUI, user can select one for each Host or let it get selected randomly (I guess select random for all Hosts is enough)
If we don't need to specify a different Settings for each Host then this can do the job
import json, random
def random_from_array(data):
if isinstance(data, list):
return data[ random.randint(0, len(data)) - 1 ]
else:
return None
jsonFile = '''
{
"grpcSettings": [
{
"data": "first"
},
{
"data": "second"
}
]
}
'''
jsonTemplate = json.loads(jsonFile)
# Print a random item
print( random_from_array(jsonTemplate["grpcSettings"]) )
# Check if Array is valid
if random_from_array(jsonTemplate):
print("valid")
else:
print("in-valid")
# Check if Array is valid
if random_from_array(jsonTemplate["grpcSettings"]):
print("valid")
else:
print("in-valid")
Currently we have Settings/Headers template for each Transport of different Client Cores (Thanks to M03ED)
If we don't need to specify a different Settings for each Host then this can do the job
https://xtls.github.io/config/transport.html#sockoptobject
sing-box have dial settings instead of sockopt :
https://sing-box.sagernet.org/configuration/shared/dial/
and Clash.Meta have common proxy settings :
https://wiki.metacubex.one/en/config/proxies/
Here is a function but it needs GUI changes that i can't do them myself
This and #1190 will be so good for pro users
The text was updated successfully, but these errors were encountered: