func (p *Point_Vmess) Conn() (proxy.Proxy, error) {
	x := p.Vmess
	if x == nil {
		return nil, fmt.Errorf("value is nil: %v", p)
	}
	port, err := strconv.Atoi(x.Port)
	if err != nil {
		return nil, fmt.Errorf("convert port to int failed: %v", err)
	}
	aid, err := strconv.Atoi(x.AlterId)
	if err != nil {
		return nil, fmt.Errorf("convert AlterId to int failed: %v", err)
	}
	c := utils.NewClientUtil(x.Address, strconv.Itoa(port))
	pp, err := websocket.NewWebsocket(x.Host, x.Path, !x.VerifyCert, x.Tls == "tls", nil)(c)
	if err != nil {
		return nil, fmt.Errorf("create websocket failed: %w", err)
	}
	pp, err = libVmess.NewVmess(x.Uuid, "", uint32(aid))(pp)
	if err != nil {
		return nil, fmt.Errorf("create vmess failed: %w", err)
	}
	return pp, nil
}
Conn parse map to net.Conn
package subscr
import (
	"crypto/sha256"
	"encoding/hex"
	"fmt"
	"strconv"
	"strings"
	"github.com/Asutorufa/yuhaiin/pkg/net/proxy/proxy"
	"github.com/Asutorufa/yuhaiin/pkg/net/proxy/quic"
	ssClient "github.com/Asutorufa/yuhaiin/pkg/net/proxy/shadowsocks"
	libVmess "github.com/Asutorufa/yuhaiin/pkg/net/proxy/vmess"
	"github.com/Asutorufa/yuhaiin/pkg/net/proxy/websocket"
	"github.com/Asutorufa/yuhaiin/pkg/net/utils"
	"google.golang.org/protobuf/encoding/protojson"
)
type vmess struct{}
var DefaultVmess = &vmess{}
func (*vmess) ParseLink(str []byte, group string) (*Point, error) {
	data := DecodeBase64(strings.ReplaceAll(string(str), "vmess://", ""))
	n := &Vmess{}
	err := protojson.UnmarshalOptions{DiscardUnknown: true, AllowPartial: true}.Unmarshal([]byte(data), n)
	if err != nil {
		z := &Vmess2{}
		err = protojson.UnmarshalOptions{DiscardUnknown: true, AllowPartial: true}.Unmarshal([]byte(data), z)
		if err != nil {
			return nil, fmt.Errorf("unmarshal failed: %v\nstr: -%s-\nRaw: %s", err, data, str)
		}
		n = &Vmess{
			Address:    z.Address,
			Port:       strconv.Itoa(int(z.Port)),
			Uuid:       z.Uuid,
			AlterId:    strconv.Itoa(int(z.AlterId)),
			Ps:         z.Ps,
			Net:        z.Net,
			Type:       z.Type,
			Tls:        z.Tls,
			Host:       z.Host,
			Path:       z.Path,
			V:          z.V,
			VerifyCert: z.VerifyCert,
			Class:      z.Class,
		}
	}
	p := &Point{
		NName:   "[vmess]" + n.Ps,
		NGroup:  group,
		NOrigin: Point_remote,
		Node:    &Point_Vmess{Vmess: n},
	}
	z := sha256.Sum256([]byte(p.String()))
	p.NHash = hex.EncodeToString(z[:])
	return p, nil
}
func (v *vmess) ParseLinkManual(link []byte, group string) (*Point, error) {
	s, err := v.ParseLink(link, group)
	if err != nil {
		return nil, err
	}
	s.NOrigin = Point_manual
	return s, nil
}