@@ -18,9 +18,9 @@ export default function Egern_Producer() {
1818 'vmess' ,
1919 'tuic' ,
2020 'wireguard' ,
21- // ...(opts['include-unsupported-proxy']
22- // ? ['wireguard ']
23- // : []),
21+ ...( opts [ 'include-unsupported-proxy' ]
22+ ? [ 'anytls ' ]
23+ : [ ] ) ,
2424 ] . includes ( proxy . type ) ||
2525 ( proxy . type === 'ss' &&
2626 ( ( proxy . plugin === 'obfs' &&
@@ -75,6 +75,14 @@ export default function Egern_Producer() {
7575 proxy . token . length !== 0 )
7676 ) {
7777 return false ;
78+ } else if (
79+ [ 'anytls' ] . includes ( proxy . type ) &&
80+ proxy . network &&
81+ ( ! [ 'tcp' ] . includes ( proxy . network ) ||
82+ ( [ 'tcp' ] . includes ( proxy . network ) &&
83+ proxy [ 'reality-opts' ] ) )
84+ ) {
85+ return false ;
7886 } else if (
7987 [ 'ws' ] . includes ( proxy . network ) &&
8088 proxy [ 'ws-opts' ] ?. [ 'v2ray-http-upgrade' ]
@@ -207,6 +215,20 @@ export default function Egern_Producer() {
207215 skip_tls_verify : proxy [ 'skip-cert-verify' ] ,
208216 websocket : proxy . websocket ,
209217 } ;
218+ } else if ( proxy . type === 'anytls' ) {
219+ proxy = {
220+ type : 'anytls' ,
221+ name : proxy . name ,
222+ server : proxy . server ,
223+ port : proxy . port ,
224+ password : proxy . password ,
225+ tfo : proxy . tfo || proxy [ 'fast-open' ] ,
226+ udp_relay :
227+ proxy . udp || proxy . udp_relay || proxy . udp_relay ,
228+ next_hop : proxy . next_hop ,
229+ sni : proxy . sni ,
230+ skip_tls_verify : proxy [ 'skip-cert-verify' ] ,
231+ } ;
210232 } else if ( proxy . type === 'vmess' ) {
211233 // Egern:传输层,支持 ws/wss/http1/http2/tls,不配置则为 tcp
212234 let security = proxy . cipher ;
@@ -428,6 +450,7 @@ export default function Egern_Producer() {
428450 'trojan' ,
429451 'vless' ,
430452 'vmess' ,
453+ 'anytls' ,
431454 ] . includes ( original . type )
432455 ) {
433456 if ( isPresent ( original , 'shadow-tls-password' ) ) {
@@ -463,6 +486,7 @@ export default function Egern_Producer() {
463486 'wireguard' ,
464487 'tuic' ,
465488 'hysteria2' ,
489+ 'anytls' ,
466490 ] . includes ( original . type )
467491 ) {
468492 if (
0 commit comments