package io.wdd.func.xray.beans.xray.transport;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.Data;

import java.util.Map;

@Data
public class TransportObject {

    private TcpObject tcpSettings;
    private KcpObject kcpSettings;
    private WebSocketObject wsSettings;
    private HttpObject httpSettings;
    private QuicObject quicSettings;
    private DomainSocketObject dsSettings;

}


@Data
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
@JsonSubTypes(value = {
        @JsonSubTypes.Type(value = NoneHeaderObject.class, name = "none"),
        @JsonSubTypes.Type(value = HttpHeaderObject.class, name = "http"),
})
abstract class TCPHeaderObject {
    String type;
}


class KcpObject {

}

/**
 * https://www.v2ray.com/chapter_02/transport/websocket.html
 *  官方参考
 */
@Data
class WebSocketObject {

    private Boolean acceptProxyProtocol;
    private String path;
    private Map<String, String> headers;

}

/**
 *
 */
@Data
class HttpObject {

}

class QuicObject {

}

class DomainSocketObject {

}