@@ -69,11 +69,30 @@ export default function SortableHost({ host, onEdit, onDuplicate, onDataChanged
6969 if ( ! host . id ) return
7070
7171 try {
72- // Include required fields for the modify operation
72+ // Send full host data with only is_disabled toggled
7373 await modifyHost ( host . id , {
7474 remark : host . remark || '' ,
75- priority : host . priority || 0 ,
75+ address : host . address || [ ] ,
76+ port : host . port ,
77+ inbound_tag : host . inbound_tag || '' ,
78+ status : host . status || [ ] ,
79+ host : host . host || [ ] ,
80+ sni : host . sni || [ ] ,
81+ path : host . path || '' ,
82+ security : host . security || 'inbound_default' ,
83+ alpn : ( ! host . alpn || host . alpn . length === 0 ) ? undefined : host . alpn ,
84+ fingerprint : host . fingerprint === '' ? undefined : host . fingerprint ,
85+ allowinsecure : host . allowinsecure || false ,
7686 is_disabled : ! host . is_disabled ,
87+ random_user_agent : host . random_user_agent || false ,
88+ use_sni_as_host : host . use_sni_as_host || false ,
89+ priority : host . priority || 0 ,
90+ ech_config_list : host . ech_config_list ,
91+ fragment_settings : host . fragment_settings ,
92+ noise_settings : host . noise_settings ,
93+ mux_settings : host . mux_settings ,
94+ transport_settings : host . transport_settings as any , // Type cast needed due to Output/Input mismatch
95+ http_headers : host . http_headers || { } ,
7796 } )
7897
7998 toast . success (
0 commit comments