func ToTypedMessage(message proto.Message) *anypb.Any {
	if message == nil {
		return nil
	}
	settings, _ := proto.Marshal(message)
	return &anypb.Any{
		TypeUrl: V2RayTypeURLHeader + GetMessageType(message),
		Value:   settings,
	}
}
ToTypedMessage converts a proto Message into TypedMessage.
package serial
import (
	"errors"
	"google.golang.org/protobuf/types/known/anypb"
	"reflect"
	"strings"
	"github.com/golang/protobuf/proto"
)
const V2RayTypeURLHeader = "types.v2fly.org/"