@@ -514,15 +514,13 @@ describe('Proxy structured producers', function () {
514514 tls : {
515515 enabled : true ,
516516 server_name : 'mask.example.com' ,
517- utls : {
518- enabled : true ,
519- } ,
520517 } ,
521518 domain_resolver : {
522519 server : 'dns-out' ,
523520 strategy : 'ipv6_only' ,
524521 } ,
525522 } ) ;
523+ expect ( output . outbounds [ 1 ] . tls ) . to . not . have . property ( 'utls' ) ;
526524 } ) ;
527525
528526 it ( 'exports parsed Surge Snell shadow-tls lines to sing-box chained outbounds' , function ( ) {
@@ -648,6 +646,36 @@ describe('Proxy structured producers', function () {
648646 } ) ;
649647 } ) ;
650648
649+ it ( 'does not emit sing-box ShadowTLS uTLS without client fingerprint' , function ( ) {
650+ const [ proxy ] = ProxyUtils . parse ( `proxies:
651+ - name: SS ShadowTLS No Fingerprint
652+ type: ss
653+ server: ss.example.com
654+ port: 443
655+ cipher: 2022-blake3-aes-128-gcm
656+ password: password
657+ udp-over-tcp: true
658+ udp-over-tcp-version: 2
659+ plugin: shadow-tls
660+ plugin-opts:
661+ host: gateway.icloud.com
662+ password: shadow_tls_password
663+ version: 3` ) ;
664+
665+ const output = loadProducedJson ( 'sing-box' , proxy ) ;
666+ const shadowtls = output . outbounds . find (
667+ ( item ) => item . tag === 'SS ShadowTLS No Fingerprint_shadowtls' ,
668+ ) ;
669+
670+ expectSubset ( shadowtls , {
671+ tls : {
672+ enabled : true ,
673+ server_name : 'gateway.icloud.com' ,
674+ } ,
675+ } ) ;
676+ expect ( shadowtls . tls ) . to . not . have . property ( 'utls' ) ;
677+ } ) ;
678+
651679 it ( 'omits unsupported sing-box ShadowTLS uTLS fingerprints' , function ( ) {
652680 const [ proxy ] = ProxyUtils . parse ( `proxies:
653681 - name: SS ShadowTLS Unsupported Fingerprint
@@ -672,12 +700,10 @@ describe('Proxy structured producers', function () {
672700 expectSubset ( shadowtls , {
673701 tls : {
674702 enabled : true ,
675- utls : {
676- enabled : true ,
677- } ,
703+ server_name : 'cloud.tencent.com' ,
678704 } ,
679705 } ) ;
680- expect ( shadowtls . tls . utls ) . to . not . have . property ( 'fingerprint ' ) ;
706+ expect ( shadowtls . tls ) . to . not . have . property ( 'utls ' ) ;
681707 } ) ;
682708
683709 it ( 'keeps only Shadowsocks shadow-tls versions 1 through 3 for Mihomo' , function ( ) {
0 commit comments