From 239d1b0fec5d3e9b9f044f70960a391101fb070d Mon Sep 17 00:00:00 2001 From: vcptr <51714622+vcptr@users.noreply.github.com> Date: Fri, 25 Oct 2019 13:18:21 +0800 Subject: [PATCH] mod v4 --- app/commander/commander.go | 8 +- app/commander/config.pb.go | 2 +- app/commander/errors.generated.go | 2 +- app/commander/outbound.go | 8 +- app/dispatcher/default.go | 24 +++--- app/dispatcher/errors.generated.go | 2 +- app/dispatcher/sniffer.go | 8 +- app/dispatcher/stats.go | 6 +- app/dispatcher/stats_test.go | 6 +- app/dns/config.pb.go | 2 +- app/dns/errors.generated.go | 2 +- app/dns/hosts.go | 8 +- app/dns/hosts_test.go | 6 +- app/dns/nameserver.go | 4 +- app/dns/nameserver_test.go | 4 +- app/dns/server.go | 18 ++--- app/dns/server_test.go | 24 +++--- app/dns/udpns.go | 22 ++--- app/log/command/command.go | 6 +- app/log/command/command_test.go | 18 ++--- app/log/command/errors.generated.go | 2 +- app/log/config.pb.go | 2 +- app/log/errors.generated.go | 2 +- app/log/log.go | 4 +- app/log/log_creator.go | 4 +- app/log/log_test.go | 8 +- app/policy/config.go | 2 +- app/policy/errors.generated.go | 2 +- app/policy/manager.go | 4 +- app/policy/manager_test.go | 6 +- app/proxyman/command/command.go | 10 +-- app/proxyman/command/command.pb.go | 6 +- app/proxyman/command/errors.generated.go | 2 +- app/proxyman/config.pb.go | 6 +- app/proxyman/inbound/always.go | 22 ++--- app/proxyman/inbound/dynamic.go | 16 ++-- app/proxyman/inbound/errors.generated.go | 2 +- app/proxyman/inbound/inbound.go | 12 +-- app/proxyman/inbound/worker.go | 30 +++---- app/proxyman/outbound/errors.generated.go | 2 +- app/proxyman/outbound/handler.go | 22 ++--- app/proxyman/outbound/handler_test.go | 4 +- app/proxyman/outbound/outbound.go | 10 +-- app/proxyman/proxyman.go | 2 +- app/reverse/bridge.go | 14 ++-- app/reverse/config.go | 2 +- app/reverse/errors.generated.go | 2 +- app/reverse/portal.go | 18 ++--- app/reverse/portal_test.go | 4 +- app/reverse/reverse.go | 12 +-- app/router/balancing.go | 4 +- app/router/condition.go | 4 +- app/router/condition_geoip.go | 2 +- app/router/condition_geoip_test.go | 10 +-- app/router/condition_test.go | 18 ++--- app/router/config.go | 4 +- app/router/config.pb.go | 2 +- app/router/errors.generated.go | 2 +- app/router/router.go | 14 ++-- app/router/router_test.go | 12 +-- app/stats/command/command.go | 10 +-- app/stats/command/command_test.go | 6 +- app/stats/command/errors.generated.go | 2 +- app/stats/config.go | 2 +- app/stats/errors.generated.go | 2 +- app/stats/stats.go | 2 +- app/stats/stats_test.go | 6 +- common/bitmask/byte_test.go | 2 +- common/buf/buffer.go | 2 +- common/buf/buffer_test.go | 4 +- common/buf/copy.go | 4 +- common/buf/copy_test.go | 6 +- common/buf/errors.generated.go | 2 +- common/buf/io_test.go | 6 +- common/buf/multi_buffer.go | 6 +- common/buf/multi_buffer_test.go | 4 +- common/buf/reader.go | 4 +- common/buf/reader_test.go | 6 +- common/buf/readv_reader.go | 2 +- common/buf/readv_test.go | 6 +- common/buf/writer.go | 4 +- common/buf/writer_test.go | 6 +- common/common.go | 2 +- common/common_test.go | 2 +- common/crypto/aes.go | 2 +- common/crypto/auth.go | 8 +- common/crypto/auth_test.go | 8 +- common/crypto/benchmark_test.go | 2 +- common/crypto/chacha20.go | 2 +- common/crypto/chacha20_test.go | 4 +- common/crypto/chunk.go | 4 +- common/crypto/chunk_test.go | 6 +- common/crypto/errors.generated.go | 2 +- common/crypto/io.go | 2 +- common/dice/dice_test.go | 2 +- common/errors.generated.go | 2 +- common/errors/errors.go | 4 +- common/errors/errors_test.go | 4 +- common/interfaces.go | 2 +- common/log/access.go | 2 +- common/log/log.go | 2 +- common/log/log_test.go | 4 +- common/log/logger.go | 6 +- common/log/logger_test.go | 6 +- common/mux/client.go | 24 +++--- common/mux/client_test.go | 16 ++-- common/mux/errors.generated.go | 2 +- common/mux/frame.go | 12 +-- common/mux/frame_test.go | 8 +- common/mux/mux_test.go | 12 +-- common/mux/reader.go | 6 +- common/mux/server.go | 22 ++--- common/mux/session.go | 6 +- common/mux/session_test.go | 2 +- common/mux/writer.go | 10 +-- common/net/address_test.go | 2 +- common/net/connection.go | 6 +- common/net/destination_test.go | 2 +- common/net/errors.generated.go | 2 +- common/net/port_test.go | 2 +- common/platform/ctlcmd/ctlcmd.go | 4 +- common/platform/ctlcmd/errors.generated.go | 2 +- common/platform/filesystem/file.go | 4 +- common/platform/platform_test.go | 4 +- common/protocol/address.go | 8 +- common/protocol/address_test.go | 8 +- common/protocol/bittorrent/bittorrent.go | 2 +- common/protocol/dns/errors.generated.go | 2 +- common/protocol/dns/io.go | 6 +- common/protocol/errors.generated.go | 2 +- common/protocol/headers.go | 6 +- common/protocol/http/headers.go | 2 +- common/protocol/http/headers_test.go | 6 +- common/protocol/http/sniff.go | 4 +- common/protocol/http/sniff_test.go | 2 +- common/protocol/id.go | 4 +- common/protocol/id_test.go | 4 +- common/protocol/server_picker_test.go | 4 +- common/protocol/server_spec.go | 4 +- common/protocol/server_spec.pb.go | 2 +- common/protocol/server_spec_test.go | 10 +-- common/protocol/time.go | 2 +- common/protocol/time_test.go | 2 +- common/protocol/tls/cert/cert.go | 2 +- common/protocol/tls/cert/errors.generated.go | 2 +- common/protocol/tls/sniff.go | 2 +- common/protocol/tls/sniff_test.go | 2 +- common/protocol/udp/packet.go | 4 +- common/protocol/user.pb.go | 2 +- common/retry/errors.generated.go | 2 +- common/retry/retry_test.go | 6 +- common/serial/serial_test.go | 6 +- common/serial/string_test.go | 2 +- common/serial/typed_message_test.go | 2 +- common/session/session.go | 6 +- common/signal/notifier_test.go | 2 +- common/signal/pubsub/pubsub.go | 6 +- common/signal/pubsub/pubsub_test.go | 2 +- common/signal/timer.go | 4 +- common/signal/timer_test.go | 2 +- common/strmatcher/benchmark_test.go | 4 +- common/strmatcher/domain_matcher_test.go | 2 +- common/strmatcher/full_matcher_test.go | 2 +- common/strmatcher/matchers_test.go | 4 +- common/task/common.go | 2 +- common/task/periodic_test.go | 4 +- common/task/task.go | 2 +- common/task/task_test.go | 4 +- common/type_test.go | 2 +- common/uuid/uuid.go | 4 +- common/uuid/uuid_test.go | 4 +- config.go | 4 +- config.pb.go | 4 +- context_test.go | 2 +- core.go | 2 +- errors.generated.go | 2 +- .../cloudflare/sidh/p503/arith_decl.go | 2 +- .../github.com/cloudflare/sidh/p503/consts.go | 4 +- .../cloudflare/sidh/p503/field_ops.go | 2 +- .../cloudflare/sidh/p751/arith_decl.go | 2 +- .../github.com/cloudflare/sidh/p751/consts.go | 4 +- .../cloudflare/sidh/p751/field_ops.go | 2 +- .../github.com/cloudflare/sidh/sidh/api.go | 2 +- .../github.com/cloudflare/sidh/sidh/params.go | 6 +- .../github.com/cloudflare/sidh/sidh/sidh.go | 2 +- .../lucas-clemente/quic-go/buffer_pool.go | 4 +- .../lucas-clemente/quic-go/client.go | 10 +-- .../lucas-clemente/quic-go/crypto_stream.go | 6 +- .../quic-go/crypto_stream_manager.go | 4 +- .../lucas-clemente/quic-go/frame_sorter.go | 4 +- .../lucas-clemente/quic-go/framer.go | 4 +- .../lucas-clemente/quic-go/interface.go | 4 +- .../quic-go/internal/ackhandler/interfaces.go | 4 +- .../quic-go/internal/ackhandler/packet.go | 4 +- .../ackhandler/packet_number_generator.go | 4 +- .../ackhandler/received_packet_handler.go | 8 +- .../ackhandler/received_packet_history.go | 8 +- .../ackhandler/received_packet_tracker.go | 8 +- .../internal/ackhandler/retransmittable.go | 2 +- .../ackhandler/sent_packet_handler.go | 10 +-- .../ackhandler/sent_packet_history.go | 2 +- .../quic-go/internal/congestion/bandwidth.go | 2 +- .../quic-go/internal/congestion/cubic.go | 4 +- .../internal/congestion/cubic_sender.go | 4 +- .../internal/congestion/hybrid_slow_start.go | 4 +- .../quic-go/internal/congestion/interface.go | 2 +- .../quic-go/internal/congestion/prr_sender.go | 2 +- .../quic-go/internal/congestion/rtt_stats.go | 2 +- .../quic-go/internal/congestion/stats.go | 2 +- .../quic-go/internal/crypto/AEAD.go | 2 +- .../quic-go/internal/crypto/aesgcm_aead.go | 2 +- .../internal/crypto/null_aead_aesgcm.go | 2 +- .../flowcontrol/base_flow_controller.go | 6 +- .../flowcontrol/connection_flow_controller.go | 8 +- .../quic-go/internal/flowcontrol/interface.go | 2 +- .../flowcontrol/stream_flow_controller.go | 8 +- .../quic-go/internal/handshake/aead.go | 2 +- .../internal/handshake/cookie_generator.go | 2 +- .../internal/handshake/crypto_setup.go | 6 +- .../internal/handshake/initial_aead.go | 4 +- .../quic-go/internal/handshake/interface.go | 4 +- .../quic-go/internal/handshake/qtls.go | 2 +- .../internal/handshake/tls_extension.go | 4 +- .../handshake/tls_extension_handler_client.go | 8 +- .../handshake/tls_extension_handler_server.go | 8 +- .../handshake/transport_parameters.go | 4 +- .../internal/utils/linkedlist/linkedlist.go | 2 +- .../quic-go/internal/utils/minmax.go | 2 +- .../quic-go/internal/utils/packet_interval.go | 2 +- .../internal/utils/streamframe_interval.go | 2 +- .../quic-go/internal/utils/varint.go | 2 +- .../internal/utils/varint_packetnumber.go | 2 +- .../quic-go/internal/wire/ack_frame.go | 4 +- .../quic-go/internal/wire/ack_range.go | 2 +- .../internal/wire/connection_close_frame.go | 6 +- .../quic-go/internal/wire/crypto_frame.go | 4 +- .../internal/wire/data_blocked_frame.go | 4 +- .../quic-go/internal/wire/extended_header.go | 4 +- .../quic-go/internal/wire/frame.go | 2 +- .../quic-go/internal/wire/frame_parser.go | 4 +- .../quic-go/internal/wire/header.go | 6 +- .../quic-go/internal/wire/log.go | 4 +- .../quic-go/internal/wire/max_data_frame.go | 4 +- .../internal/wire/max_stream_data_frame.go | 4 +- .../internal/wire/max_streams_frame.go | 4 +- .../internal/wire/new_connection_id_frame.go | 4 +- .../quic-go/internal/wire/new_token_frame.go | 4 +- .../internal/wire/path_challenge_frame.go | 2 +- .../internal/wire/path_response_frame.go | 2 +- .../quic-go/internal/wire/ping_frame.go | 2 +- .../internal/wire/reset_stream_frame.go | 4 +- .../wire/retire_connection_id_frame.go | 4 +- .../internal/wire/stop_sending_frame.go | 4 +- .../wire/stream_data_blocked_frame.go | 4 +- .../quic-go/internal/wire/stream_frame.go | 6 +- .../internal/wire/streams_blocked_frame.go | 4 +- .../internal/wire/version_negotiation.go | 4 +- .../lucas-clemente/quic-go/multiplexer.go | 2 +- .../quic-go/packet_handler_map.go | 6 +- .../lucas-clemente/quic-go/packet_packer.go | 10 +-- .../lucas-clemente/quic-go/packet_unpacker.go | 8 +- .../lucas-clemente/quic-go/receive_stream.go | 8 +- .../lucas-clemente/quic-go/send_stream.go | 8 +- .../lucas-clemente/quic-go/server.go | 10 +-- .../lucas-clemente/quic-go/server_session.go | 4 +- .../lucas-clemente/quic-go/session.go | 16 ++-- .../lucas-clemente/quic-go/stream.go | 6 +- .../lucas-clemente/quic-go/streams_map.go | 8 +- .../quic-go/streams_map_generic_helper.go | 4 +- .../quic-go/streams_map_incoming_bidi.go | 4 +- .../quic-go/streams_map_incoming_generic.go | 4 +- .../quic-go/streams_map_incoming_uni.go | 4 +- .../quic-go/streams_map_outgoing_bidi.go | 6 +- .../quic-go/streams_map_outgoing_generic.go | 6 +- .../quic-go/streams_map_outgoing_uni.go | 6 +- .../quic-go/window_update_queue.go | 6 +- external/github.com/marten-seemann/qtls/13.go | 2 +- features/dns/client.go | 8 +- features/dns/localdns/client.go | 4 +- features/errors.generated.go | 2 +- features/feature.go | 2 +- features/inbound/inbound.go | 6 +- features/outbound/outbound.go | 6 +- features/policy/policy.go | 4 +- features/routing/dispatcher.go | 6 +- features/routing/router.go | 4 +- features/stats/errors.generated.go | 2 +- features/stats/stats.go | 2 +- functions.go | 8 +- functions_test.go | 18 ++--- go.mod | 2 +- infra/conf/api.go | 10 +-- infra/conf/blackhole.go | 4 +- infra/conf/blackhole_test.go | 6 +- infra/conf/command/command.go | 6 +- infra/conf/command/errors.generated.go | 2 +- infra/conf/common.go | 4 +- infra/conf/common_test.go | 8 +- infra/conf/dns.go | 6 +- infra/conf/dns_proxy.go | 4 +- infra/conf/dns_proxy_test.go | 6 +- infra/conf/dns_test.go | 14 ++-- infra/conf/dokodemo.go | 2 +- infra/conf/dokodemo_test.go | 6 +- infra/conf/errors.generated.go | 2 +- infra/conf/freedom.go | 6 +- infra/conf/freedom_test.go | 8 +- infra/conf/general_test.go | 4 +- infra/conf/http.go | 6 +- infra/conf/http_test.go | 4 +- infra/conf/json/reader.go | 2 +- infra/conf/json/reader_test.go | 4 +- infra/conf/log.go | 4 +- infra/conf/mtproto.go | 6 +- infra/conf/mtproto_test.go | 8 +- infra/conf/policy.go | 2 +- infra/conf/policy_test.go | 4 +- infra/conf/reverse.go | 2 +- infra/conf/reverse_test.go | 4 +- infra/conf/router.go | 6 +- infra/conf/router_test.go | 6 +- infra/conf/serial/errors.generated.go | 2 +- infra/conf/serial/loader.go | 8 +- infra/conf/serial/loader_test.go | 2 +- infra/conf/shadowsocks.go | 6 +- infra/conf/shadowsocks_test.go | 10 +-- infra/conf/socks.go | 6 +- infra/conf/socks_test.go | 10 +-- infra/conf/transport.go | 6 +- infra/conf/transport_authenticators.go | 14 ++-- infra/conf/transport_internet.go | 22 ++--- infra/conf/transport_test.go | 24 +++--- infra/conf/v2ray.go | 10 +-- infra/conf/v2ray_test.go | 38 ++++----- infra/conf/vmess.go | 10 +-- infra/conf/vmess_test.go | 14 ++-- infra/control/api.go | 6 +- infra/control/cert.go | 6 +- infra/control/errors.generated.go | 2 +- infra/control/fetch.go | 4 +- infra/control/love.go | 4 +- infra/control/main/main.go | 4 +- infra/control/tlsping.go | 2 +- infra/control/uuid.go | 4 +- infra/control/verify.go | 2 +- infra/vprotogen/main.go | 2 +- main/confloader/external/errors.generated.go | 2 +- main/confloader/external/external.go | 6 +- main/distro/all/all.go | 80 +++++++++---------- main/errors.generated.go | 2 +- main/json/config_json.go | 8 +- main/json/errors.generated.go | 2 +- main/jsonem/jsonem.go | 6 +- main/main.go | 8 +- proxy/blackhole/blackhole.go | 6 +- proxy/blackhole/blackhole_test.go | 12 +-- proxy/blackhole/config.go | 4 +- proxy/blackhole/config.pb.go | 2 +- proxy/blackhole/config_test.go | 6 +- proxy/blackhole/errors.generated.go | 2 +- proxy/dns/config.pb.go | 2 +- proxy/dns/dns.go | 20 ++--- proxy/dns/dns_test.go | 28 +++---- proxy/dns/errors.generated.go | 2 +- proxy/dokodemo/config.go | 2 +- proxy/dokodemo/config.pb.go | 2 +- proxy/dokodemo/dokodemo.go | 22 ++--- proxy/dokodemo/errors.generated.go | 2 +- proxy/freedom/config.pb.go | 2 +- proxy/freedom/errors.generated.go | 2 +- proxy/freedom/freedom.go | 26 +++--- proxy/http/client.go | 24 +++--- proxy/http/config.go | 2 +- proxy/http/config.pb.go | 2 +- proxy/http/errors.generated.go | 2 +- proxy/http/server.go | 28 +++---- proxy/mtproto/auth.go | 2 +- proxy/mtproto/auth_test.go | 4 +- proxy/mtproto/client.go | 16 ++-- proxy/mtproto/config.go | 2 +- proxy/mtproto/config.pb.go | 2 +- proxy/mtproto/errors.generated.go | 2 +- proxy/mtproto/server.go | 24 +++--- proxy/proxy.go | 10 +-- proxy/shadowsocks/client.go | 24 +++--- proxy/shadowsocks/config.go | 8 +- proxy/shadowsocks/config.pb.go | 4 +- proxy/shadowsocks/config_test.go | 6 +- proxy/shadowsocks/errors.generated.go | 2 +- proxy/shadowsocks/ota.go | 8 +- proxy/shadowsocks/ota_test.go | 6 +- proxy/shadowsocks/protocol.go | 10 +-- proxy/shadowsocks/protocol_test.go | 10 +-- proxy/shadowsocks/server.go | 28 +++---- proxy/socks/client.go | 24 +++--- proxy/socks/config.go | 2 +- proxy/socks/config.pb.go | 4 +- proxy/socks/errors.generated.go | 2 +- proxy/socks/protocol.go | 8 +- proxy/socks/protocol_test.go | 10 +-- proxy/socks/server.go | 30 +++---- proxy/vmess/account.go | 6 +- proxy/vmess/account.pb.go | 2 +- proxy/vmess/encoding/auth.go | 2 +- proxy/vmess/encoding/auth_test.go | 4 +- proxy/vmess/encoding/client.go | 16 ++-- proxy/vmess/encoding/commands.go | 12 +-- proxy/vmess/encoding/commands_test.go | 10 +-- proxy/vmess/encoding/encoding.go | 4 +- proxy/vmess/encoding/encoding_test.go | 14 ++-- proxy/vmess/encoding/errors.generated.go | 2 +- proxy/vmess/encoding/server.go | 16 ++-- proxy/vmess/errors.generated.go | 2 +- proxy/vmess/inbound/config.pb.go | 2 +- proxy/vmess/inbound/errors.generated.go | 2 +- proxy/vmess/inbound/inbound.go | 34 ++++---- proxy/vmess/outbound/command.go | 8 +- proxy/vmess/outbound/config.pb.go | 2 +- proxy/vmess/outbound/errors.generated.go | 2 +- proxy/vmess/outbound/outbound.go | 30 +++---- proxy/vmess/validator.go | 8 +- proxy/vmess/validator_test.go | 10 +-- testing/mocks/log.go | 2 +- testing/mocks/mux.go | 2 +- testing/mocks/outbound.go | 2 +- testing/mocks/proxy.go | 8 +- testing/scenarios/command_test.go | 38 ++++----- testing/scenarios/common.go | 18 ++--- testing/scenarios/dns_test.go | 22 ++--- testing/scenarios/dokodemo_test.go | 32 ++++---- testing/scenarios/feature_test.go | 48 +++++------ testing/scenarios/http_test.go | 20 ++--- testing/scenarios/policy_test.go | 32 ++++---- testing/scenarios/reverse_test.go | 38 ++++----- testing/scenarios/shadowsocks_test.go | 28 +++---- testing/scenarios/socks_test.go | 26 +++--- testing/scenarios/tls_test.go | 38 ++++----- testing/scenarios/transport_test.go | 42 +++++----- testing/scenarios/vmess_test.go | 36 ++++----- testing/servers/http/http.go | 2 +- testing/servers/tcp/port.go | 4 +- testing/servers/tcp/tcp.go | 10 +-- testing/servers/udp/port.go | 4 +- testing/servers/udp/udp.go | 2 +- transport/config.go | 2 +- transport/config.pb.go | 2 +- transport/internet/config.go | 4 +- transport/internet/config.pb.go | 2 +- transport/internet/connection.go | 2 +- transport/internet/dialer.go | 4 +- transport/internet/dialer_test.go | 8 +- transport/internet/domainsocket/config.go | 6 +- transport/internet/domainsocket/dial.go | 8 +- .../internet/domainsocket/errors.generated.go | 2 +- transport/internet/domainsocket/listener.go | 8 +- .../internet/domainsocket/listener_test.go | 10 +-- transport/internet/errors.generated.go | 2 +- transport/internet/header.go | 2 +- transport/internet/header_test.go | 14 ++-- transport/internet/headers/http/config.go | 2 +- .../internet/headers/http/errors.generated.go | 2 +- transport/internet/headers/http/http.go | 4 +- transport/internet/headers/http/http_test.go | 8 +- transport/internet/headers/noop/noop.go | 2 +- transport/internet/headers/srtp/srtp.go | 4 +- transport/internet/headers/srtp/srtp_test.go | 6 +- transport/internet/headers/tls/dtls.go | 4 +- transport/internet/headers/tls/dtls_test.go | 6 +- transport/internet/headers/utp/utp.go | 4 +- transport/internet/headers/utp/utp_test.go | 6 +- transport/internet/headers/wechat/wechat.go | 4 +- .../internet/headers/wechat/wechat_test.go | 6 +- .../internet/headers/wireguard/wireguard.go | 2 +- transport/internet/http/config.go | 6 +- transport/internet/http/dialer.go | 12 +-- transport/internet/http/errors.generated.go | 2 +- transport/internet/http/http_test.go | 16 ++-- transport/internet/http/hub.go | 14 ++-- transport/internet/kcp/config.go | 4 +- transport/internet/kcp/config.pb.go | 2 +- transport/internet/kcp/connection.go | 6 +- transport/internet/kcp/connection_test.go | 4 +- transport/internet/kcp/crypt.go | 2 +- transport/internet/kcp/crypt_test.go | 4 +- transport/internet/kcp/dialer.go | 12 +-- transport/internet/kcp/errors.generated.go | 2 +- transport/internet/kcp/io.go | 6 +- transport/internet/kcp/io_test.go | 2 +- transport/internet/kcp/kcp_test.go | 10 +-- transport/internet/kcp/listener.go | 12 +-- transport/internet/kcp/output.go | 4 +- transport/internet/kcp/receiving.go | 2 +- transport/internet/kcp/segment.go | 2 +- transport/internet/kcp/segment_test.go | 2 +- transport/internet/kcp/sending.go | 2 +- transport/internet/quic/config.go | 6 +- transport/internet/quic/config.pb.go | 4 +- transport/internet/quic/conn.go | 10 +-- transport/internet/quic/dialer.go | 12 +-- transport/internet/quic/errors.generated.go | 2 +- transport/internet/quic/hub.go | 14 ++-- transport/internet/quic/pool.go | 2 +- transport/internet/quic/quic.go | 4 +- transport/internet/quic/quic_test.go | 22 ++--- transport/internet/sockopt_linux_test.go | 8 +- transport/internet/sockopt_test.go | 8 +- transport/internet/system_dialer.go | 4 +- transport/internet/system_listener.go | 4 +- transport/internet/system_listener_test.go | 4 +- transport/internet/tcp/config.go | 4 +- transport/internet/tcp/config.pb.go | 2 +- transport/internet/tcp/dialer.go | 10 +-- transport/internet/tcp/errors.generated.go | 2 +- transport/internet/tcp/hub.go | 10 +-- transport/internet/tcp/sockopt_linux.go | 4 +- transport/internet/tcp/sockopt_linux_test.go | 8 +- transport/internet/tcp_hub.go | 2 +- transport/internet/tls/config.go | 6 +- transport/internet/tls/config_test.go | 6 +- transport/internet/tls/errors.generated.go | 2 +- transport/internet/tls/tls.go | 4 +- transport/internet/udp/config.go | 4 +- transport/internet/udp/dialer.go | 6 +- transport/internet/udp/dispatcher.go | 18 ++--- transport/internet/udp/dispatcher_test.go | 16 ++-- transport/internet/udp/errors.generated.go | 2 +- transport/internet/udp/hub.go | 8 +- transport/internet/udp/hub_linux.go | 2 +- transport/internet/websocket/config.go | 4 +- transport/internet/websocket/connection.go | 6 +- transport/internet/websocket/dialer.go | 10 +-- .../internet/websocket/errors.generated.go | 2 +- transport/internet/websocket/hub.go | 12 +-- transport/internet/websocket/ws_test.go | 12 +-- transport/link.go | 2 +- transport/pipe/impl.go | 8 +- transport/pipe/pipe.go | 6 +- transport/pipe/pipe_test.go | 6 +- transport/pipe/reader.go | 2 +- transport/pipe/writer.go | 2 +- v2ray.go | 20 ++--- v2ray_test.go | 30 +++---- 542 files changed, 1845 insertions(+), 1845 deletions(-) diff --git a/app/commander/commander.go b/app/commander/commander.go index 2a8ae5011..d804f4d88 100644 --- a/app/commander/commander.go +++ b/app/commander/commander.go @@ -11,10 +11,10 @@ import ( "google.golang.org/grpc" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/signal/done" - "v2ray.com/core/features/outbound" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/signal/done" + "v2ray.com/core/v4/features/outbound" ) // Commander is a V2Ray feature that provides gRPC methods to external clients. diff --git a/app/commander/config.pb.go b/app/commander/config.pb.go index 8866190ad..e0c73260f 100644 --- a/app/commander/config.pb.go +++ b/app/commander/config.pb.go @@ -4,7 +4,7 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - serial "v2ray.com/core/common/serial" + serial "v2ray.com/core/v4/common/serial" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/app/commander/errors.generated.go b/app/commander/errors.generated.go index 406ec0cae..91c7481e6 100644 --- a/app/commander/errors.generated.go +++ b/app/commander/errors.generated.go @@ -1,6 +1,6 @@ package commander -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/commander/outbound.go b/app/commander/outbound.go index 907497059..dedb065a8 100644 --- a/app/commander/outbound.go +++ b/app/commander/outbound.go @@ -6,10 +6,10 @@ import ( "context" "sync" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/signal/done" - "v2ray.com/core/transport" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/signal/done" + "v2ray.com/core/v4/transport" ) // OutboundListener is a net.Listener for listening gRPC connections. diff --git a/app/dispatcher/default.go b/app/dispatcher/default.go index 5e11eea5f..03c60e7e2 100644 --- a/app/dispatcher/default.go +++ b/app/dispatcher/default.go @@ -10,18 +10,18 @@ import ( "sync" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/session" - "v2ray.com/core/features/outbound" - "v2ray.com/core/features/policy" - "v2ray.com/core/features/routing" - "v2ray.com/core/features/stats" - "v2ray.com/core/transport" - "v2ray.com/core/transport/pipe" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/features/outbound" + "v2ray.com/core/v4/features/policy" + "v2ray.com/core/v4/features/routing" + "v2ray.com/core/v4/features/stats" + "v2ray.com/core/v4/transport" + "v2ray.com/core/v4/transport/pipe" ) var ( diff --git a/app/dispatcher/errors.generated.go b/app/dispatcher/errors.generated.go index e11616099..abf487e6c 100644 --- a/app/dispatcher/errors.generated.go +++ b/app/dispatcher/errors.generated.go @@ -1,6 +1,6 @@ package dispatcher -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/dispatcher/sniffer.go b/app/dispatcher/sniffer.go index 34851ab8b..469d8a883 100644 --- a/app/dispatcher/sniffer.go +++ b/app/dispatcher/sniffer.go @@ -3,10 +3,10 @@ package dispatcher import ( - "v2ray.com/core/common" - "v2ray.com/core/common/protocol/bittorrent" - "v2ray.com/core/common/protocol/http" - "v2ray.com/core/common/protocol/tls" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/protocol/bittorrent" + "v2ray.com/core/v4/common/protocol/http" + "v2ray.com/core/v4/common/protocol/tls" ) type SniffResult interface { diff --git a/app/dispatcher/stats.go b/app/dispatcher/stats.go index 9b1c3a063..f931a7a6d 100644 --- a/app/dispatcher/stats.go +++ b/app/dispatcher/stats.go @@ -3,9 +3,9 @@ package dispatcher import ( - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/features/stats" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/features/stats" ) type SizeStatWriter struct { diff --git a/app/dispatcher/stats_test.go b/app/dispatcher/stats_test.go index cdac8d9aa..e8d809fa9 100644 --- a/app/dispatcher/stats_test.go +++ b/app/dispatcher/stats_test.go @@ -3,9 +3,9 @@ package dispatcher_test import ( "testing" - . "v2ray.com/core/app/dispatcher" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" + . "v2ray.com/core/v4/app/dispatcher" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" ) type TestCounter int64 diff --git a/app/dns/config.pb.go b/app/dns/config.pb.go index 06361f9bd..2ba6aaea4 100644 --- a/app/dns/config.pb.go +++ b/app/dns/config.pb.go @@ -4,7 +4,7 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - net "v2ray.com/core/common/net" + net "v2ray.com/core/v4/common/net" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/app/dns/errors.generated.go b/app/dns/errors.generated.go index ba70372f0..8058c1330 100644 --- a/app/dns/errors.generated.go +++ b/app/dns/errors.generated.go @@ -1,6 +1,6 @@ package dns -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/dns/hosts.go b/app/dns/hosts.go index b4d18ff1e..839c7e473 100644 --- a/app/dns/hosts.go +++ b/app/dns/hosts.go @@ -3,10 +3,10 @@ package dns import ( - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/strmatcher" - "v2ray.com/core/features" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/strmatcher" + "v2ray.com/core/v4/features" ) // StaticHosts represents static domain-ip mapping in DNS server. diff --git a/app/dns/hosts_test.go b/app/dns/hosts_test.go index 2bb65cb5c..8ede7a4fe 100644 --- a/app/dns/hosts_test.go +++ b/app/dns/hosts_test.go @@ -5,9 +5,9 @@ import ( "github.com/google/go-cmp/cmp" - . "v2ray.com/core/app/dns" - "v2ray.com/core/common" - "v2ray.com/core/common/net" + . "v2ray.com/core/v4/app/dns" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" ) func TestStaticHosts(t *testing.T) { diff --git a/app/dns/nameserver.go b/app/dns/nameserver.go index 123336e72..169c5ccba 100644 --- a/app/dns/nameserver.go +++ b/app/dns/nameserver.go @@ -5,8 +5,8 @@ package dns import ( "context" - "v2ray.com/core/common/net" - "v2ray.com/core/features/dns/localdns" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/features/dns/localdns" ) // IPOption is an object for IP query options. diff --git a/app/dns/nameserver_test.go b/app/dns/nameserver_test.go index 221d1451c..2f9c4a41f 100644 --- a/app/dns/nameserver_test.go +++ b/app/dns/nameserver_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - . "v2ray.com/core/app/dns" - "v2ray.com/core/common" + . "v2ray.com/core/v4/app/dns" + "v2ray.com/core/v4/common" ) func TestLocalNameServer(t *testing.T) { diff --git a/app/dns/server.go b/app/dns/server.go index 48165c0b3..fd4c57c24 100644 --- a/app/dns/server.go +++ b/app/dns/server.go @@ -9,15 +9,15 @@ import ( "sync" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/common/strmatcher" - "v2ray.com/core/common/uuid" - "v2ray.com/core/features" - "v2ray.com/core/features/dns" - "v2ray.com/core/features/routing" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/common/strmatcher" + "v2ray.com/core/v4/common/uuid" + "v2ray.com/core/v4/features" + "v2ray.com/core/v4/features/dns" + "v2ray.com/core/v4/features/routing" ) // Server is a DNS rely server. diff --git a/app/dns/server_test.go b/app/dns/server_test.go index a7e1e7b95..d850e69b6 100644 --- a/app/dns/server_test.go +++ b/app/dns/server_test.go @@ -7,18 +7,18 @@ import ( "github.com/google/go-cmp/cmp" "github.com/miekg/dns" - "v2ray.com/core" - "v2ray.com/core/app/dispatcher" - . "v2ray.com/core/app/dns" - "v2ray.com/core/app/policy" - "v2ray.com/core/app/proxyman" - _ "v2ray.com/core/app/proxyman/outbound" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/serial" - feature_dns "v2ray.com/core/features/dns" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/testing/servers/udp" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/dispatcher" + . "v2ray.com/core/v4/app/dns" + "v2ray.com/core/v4/app/policy" + "v2ray.com/core/v4/app/proxyman" + _ "v2ray.com/core/v4/app/proxyman/outbound" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/serial" + feature_dns "v2ray.com/core/v4/features/dns" + "v2ray.com/core/v4/proxy/freedom" + "v2ray.com/core/v4/testing/servers/udp" ) type staticHandler struct { diff --git a/app/dns/udpns.go b/app/dns/udpns.go index 853c95d21..2af38bc46 100644 --- a/app/dns/udpns.go +++ b/app/dns/udpns.go @@ -10,17 +10,17 @@ import ( "time" "golang.org/x/net/dns/dnsmessage" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol/dns" - udp_proto "v2ray.com/core/common/protocol/udp" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal/pubsub" - "v2ray.com/core/common/task" - dns_feature "v2ray.com/core/features/dns" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport/internet/udp" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/errors" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol/dns" + udp_proto "v2ray.com/core/v4/common/protocol/udp" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/common/signal/pubsub" + "v2ray.com/core/v4/common/task" + dns_feature "v2ray.com/core/v4/features/dns" + "v2ray.com/core/v4/features/routing" + "v2ray.com/core/v4/transport/internet/udp" ) type record struct { diff --git a/app/log/command/command.go b/app/log/command/command.go index 5d3ef6c45..55e24aedb 100644 --- a/app/log/command/command.go +++ b/app/log/command/command.go @@ -9,9 +9,9 @@ import ( grpc "google.golang.org/grpc" - "v2ray.com/core" - "v2ray.com/core/app/log" - "v2ray.com/core/common" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/log" + "v2ray.com/core/v4/common" ) type LoggerServer struct { diff --git a/app/log/command/command_test.go b/app/log/command/command_test.go index be96d7578..39cd26c36 100644 --- a/app/log/command/command_test.go +++ b/app/log/command/command_test.go @@ -4,15 +4,15 @@ import ( "context" "testing" - "v2ray.com/core" - "v2ray.com/core/app/dispatcher" - "v2ray.com/core/app/log" - . "v2ray.com/core/app/log/command" - "v2ray.com/core/app/proxyman" - _ "v2ray.com/core/app/proxyman/inbound" - _ "v2ray.com/core/app/proxyman/outbound" - "v2ray.com/core/common" - "v2ray.com/core/common/serial" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/dispatcher" + "v2ray.com/core/v4/app/log" + . "v2ray.com/core/v4/app/log/command" + "v2ray.com/core/v4/app/proxyman" + _ "v2ray.com/core/v4/app/proxyman/inbound" + _ "v2ray.com/core/v4/app/proxyman/outbound" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/serial" ) func TestLoggerRestart(t *testing.T) { diff --git a/app/log/command/errors.generated.go b/app/log/command/errors.generated.go index 66f780510..ce99c2a5d 100644 --- a/app/log/command/errors.generated.go +++ b/app/log/command/errors.generated.go @@ -1,6 +1,6 @@ package command -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/log/config.pb.go b/app/log/config.pb.go index 477a1e6ed..b21fae9c1 100644 --- a/app/log/config.pb.go +++ b/app/log/config.pb.go @@ -4,7 +4,7 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - log "v2ray.com/core/common/log" + log "v2ray.com/core/v4/common/log" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/app/log/errors.generated.go b/app/log/errors.generated.go index 3088c8116..003ed47a7 100644 --- a/app/log/errors.generated.go +++ b/app/log/errors.generated.go @@ -1,6 +1,6 @@ package log -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/log/log.go b/app/log/log.go index 22bba19ef..961059685 100644 --- a/app/log/log.go +++ b/app/log/log.go @@ -8,8 +8,8 @@ import ( "context" "sync" - "v2ray.com/core/common" - "v2ray.com/core/common/log" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/log" ) // Instance is a log.Handler that handles logs. diff --git a/app/log/log_creator.go b/app/log/log_creator.go index c7ea5a805..99182cd9c 100644 --- a/app/log/log_creator.go +++ b/app/log/log_creator.go @@ -3,8 +3,8 @@ package log import ( - "v2ray.com/core/common" - "v2ray.com/core/common/log" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/log" ) type HandlerCreatorOptions struct { diff --git a/app/log/log_test.go b/app/log/log_test.go index 41bb7e832..cb1284739 100644 --- a/app/log/log_test.go +++ b/app/log/log_test.go @@ -5,10 +5,10 @@ import ( "testing" "github.com/golang/mock/gomock" - "v2ray.com/core/app/log" - "v2ray.com/core/common" - clog "v2ray.com/core/common/log" - "v2ray.com/core/testing/mocks" + "v2ray.com/core/v4/app/log" + "v2ray.com/core/v4/common" + clog "v2ray.com/core/v4/common/log" + "v2ray.com/core/v4/testing/mocks" ) func TestCustomLogHandler(t *testing.T) { diff --git a/app/policy/config.go b/app/policy/config.go index ffe81138f..55f5a5861 100644 --- a/app/policy/config.go +++ b/app/policy/config.go @@ -3,7 +3,7 @@ package policy import ( "time" - "v2ray.com/core/features/policy" + "v2ray.com/core/v4/features/policy" ) // Duration converts Second to time.Duration. diff --git a/app/policy/errors.generated.go b/app/policy/errors.generated.go index 123e84992..140bbb7ae 100644 --- a/app/policy/errors.generated.go +++ b/app/policy/errors.generated.go @@ -1,6 +1,6 @@ package policy -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/policy/manager.go b/app/policy/manager.go index 205fe3d66..4883e9d06 100644 --- a/app/policy/manager.go +++ b/app/policy/manager.go @@ -3,8 +3,8 @@ package policy import ( "context" - "v2ray.com/core/common" - "v2ray.com/core/features/policy" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/features/policy" ) // Instance is an instance of Policy manager. diff --git a/app/policy/manager_test.go b/app/policy/manager_test.go index 8f2a61759..192065832 100644 --- a/app/policy/manager_test.go +++ b/app/policy/manager_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - . "v2ray.com/core/app/policy" - "v2ray.com/core/common" - "v2ray.com/core/features/policy" + . "v2ray.com/core/v4/app/policy" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/features/policy" ) func TestPolicy(t *testing.T) { diff --git a/app/proxyman/command/command.go b/app/proxyman/command/command.go index 64b4a2e69..8e3b23a16 100755 --- a/app/proxyman/command/command.go +++ b/app/proxyman/command/command.go @@ -7,11 +7,11 @@ import ( grpc "google.golang.org/grpc" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/features/inbound" - "v2ray.com/core/features/outbound" - "v2ray.com/core/proxy" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/features/inbound" + "v2ray.com/core/v4/features/outbound" + "v2ray.com/core/v4/proxy" ) // InboundOperation is the interface for operations that applies to inbound handlers. diff --git a/app/proxyman/command/command.pb.go b/app/proxyman/command/command.pb.go index 71203bb25..4779b6870 100644 --- a/app/proxyman/command/command.pb.go +++ b/app/proxyman/command/command.pb.go @@ -6,9 +6,9 @@ import ( proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" math "math" - core "v2ray.com/core" - protocol "v2ray.com/core/common/protocol" - serial "v2ray.com/core/common/serial" + core "v2ray.com/core/v4" + protocol "v2ray.com/core/v4/common/protocol" + serial "v2ray.com/core/v4/common/serial" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/app/proxyman/command/errors.generated.go b/app/proxyman/command/errors.generated.go index 66f780510..ce99c2a5d 100644 --- a/app/proxyman/command/errors.generated.go +++ b/app/proxyman/command/errors.generated.go @@ -1,6 +1,6 @@ package command -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/proxyman/config.pb.go b/app/proxyman/config.pb.go index a53efc8ef..7aa74baee 100644 --- a/app/proxyman/config.pb.go +++ b/app/proxyman/config.pb.go @@ -4,9 +4,9 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - net "v2ray.com/core/common/net" - serial "v2ray.com/core/common/serial" - internet "v2ray.com/core/transport/internet" + net "v2ray.com/core/v4/common/net" + serial "v2ray.com/core/v4/common/serial" + internet "v2ray.com/core/v4/transport/internet" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/app/proxyman/inbound/always.go b/app/proxyman/inbound/always.go index e67603576..fc0269576 100644 --- a/app/proxyman/inbound/always.go +++ b/app/proxyman/inbound/always.go @@ -3,17 +3,17 @@ package inbound import ( "context" - "v2ray.com/core" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - "v2ray.com/core/common/dice" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/mux" - "v2ray.com/core/common/net" - "v2ray.com/core/features/policy" - "v2ray.com/core/features/stats" - "v2ray.com/core/proxy" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/dice" + "v2ray.com/core/v4/common/errors" + "v2ray.com/core/v4/common/mux" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/features/policy" + "v2ray.com/core/v4/features/stats" + "v2ray.com/core/v4/proxy" + "v2ray.com/core/v4/transport/internet" ) func getStatCounter(v *core.Instance, tag string) (stats.Counter, stats.Counter) { diff --git a/app/proxyman/inbound/dynamic.go b/app/proxyman/inbound/dynamic.go index 36e4b50b3..654e66319 100644 --- a/app/proxyman/inbound/dynamic.go +++ b/app/proxyman/inbound/dynamic.go @@ -5,14 +5,14 @@ import ( "sync" "time" - "v2ray.com/core" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common/dice" - "v2ray.com/core/common/mux" - "v2ray.com/core/common/net" - "v2ray.com/core/common/task" - "v2ray.com/core/proxy" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/common/dice" + "v2ray.com/core/v4/common/mux" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/task" + "v2ray.com/core/v4/proxy" + "v2ray.com/core/v4/transport/internet" ) type DynamicInboundHandler struct { diff --git a/app/proxyman/inbound/errors.generated.go b/app/proxyman/inbound/errors.generated.go index 90d805b1e..f8f57a5de 100644 --- a/app/proxyman/inbound/errors.generated.go +++ b/app/proxyman/inbound/errors.generated.go @@ -1,6 +1,6 @@ package inbound -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/proxyman/inbound/inbound.go b/app/proxyman/inbound/inbound.go index 528356942..63befaf6e 100644 --- a/app/proxyman/inbound/inbound.go +++ b/app/proxyman/inbound/inbound.go @@ -6,12 +6,12 @@ import ( "context" "sync" - "v2ray.com/core" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/session" - "v2ray.com/core/features/inbound" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/features/inbound" ) // Manager is to manage all inbound handlers. diff --git a/app/proxyman/inbound/worker.go b/app/proxyman/inbound/worker.go index 2a2793eb7..8ea367e0b 100644 --- a/app/proxyman/inbound/worker.go +++ b/app/proxyman/inbound/worker.go @@ -6,21 +6,21 @@ import ( "sync/atomic" "time" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal/done" - "v2ray.com/core/common/task" - "v2ray.com/core/features/routing" - "v2ray.com/core/features/stats" - "v2ray.com/core/proxy" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tcp" - "v2ray.com/core/transport/internet/udp" - "v2ray.com/core/transport/pipe" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/common/signal/done" + "v2ray.com/core/v4/common/task" + "v2ray.com/core/v4/features/routing" + "v2ray.com/core/v4/features/stats" + "v2ray.com/core/v4/proxy" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/internet/tcp" + "v2ray.com/core/v4/transport/internet/udp" + "v2ray.com/core/v4/transport/pipe" ) type worker interface { diff --git a/app/proxyman/outbound/errors.generated.go b/app/proxyman/outbound/errors.generated.go index 37e984d87..9ce9ec1ac 100644 --- a/app/proxyman/outbound/errors.generated.go +++ b/app/proxyman/outbound/errors.generated.go @@ -1,6 +1,6 @@ package outbound -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/proxyman/outbound/handler.go b/app/proxyman/outbound/handler.go index 3f5e0ada5..bec052da5 100644 --- a/app/proxyman/outbound/handler.go +++ b/app/proxyman/outbound/handler.go @@ -3,17 +3,17 @@ package outbound import ( "context" - "v2ray.com/core" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - "v2ray.com/core/common/mux" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/features/outbound" - "v2ray.com/core/proxy" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/pipe" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/mux" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/features/outbound" + "v2ray.com/core/v4/proxy" + "v2ray.com/core/v4/transport" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/pipe" ) // Handler is an implements of outbound.Handler. diff --git a/app/proxyman/outbound/handler_test.go b/app/proxyman/outbound/handler_test.go index 25906f17a..69bc9d178 100644 --- a/app/proxyman/outbound/handler_test.go +++ b/app/proxyman/outbound/handler_test.go @@ -3,8 +3,8 @@ package outbound_test import ( "testing" - . "v2ray.com/core/app/proxyman/outbound" - "v2ray.com/core/features/outbound" + . "v2ray.com/core/v4/app/proxyman/outbound" + "v2ray.com/core/v4/features/outbound" ) func TestInterfaces(t *testing.T) { diff --git a/app/proxyman/outbound/outbound.go b/app/proxyman/outbound/outbound.go index af286116d..e1bdd5b75 100644 --- a/app/proxyman/outbound/outbound.go +++ b/app/proxyman/outbound/outbound.go @@ -7,11 +7,11 @@ import ( "strings" "sync" - "v2ray.com/core" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" - "v2ray.com/core/features/outbound" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/errors" + "v2ray.com/core/v4/features/outbound" ) // Manager is to manage all outbound handlers. diff --git a/app/proxyman/proxyman.go b/app/proxyman/proxyman.go index f83afcea8..b0850df86 100644 --- a/app/proxyman/proxyman.go +++ b/app/proxyman/proxyman.go @@ -4,7 +4,7 @@ package proxyman import ( "context" - "v2ray.com/core/common/session" + "v2ray.com/core/v4/common/session" ) // ContextWithSniffingConfig is a wrapper of session.ContextWithContent. diff --git a/app/reverse/bridge.go b/app/reverse/bridge.go index 502745485..378e9ad7f 100644 --- a/app/reverse/bridge.go +++ b/app/reverse/bridge.go @@ -7,13 +7,13 @@ import ( "time" "github.com/golang/protobuf/proto" - "v2ray.com/core/common/mux" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/common/task" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport" - "v2ray.com/core/transport/pipe" + "v2ray.com/core/v4/common/mux" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/common/task" + "v2ray.com/core/v4/features/routing" + "v2ray.com/core/v4/transport" + "v2ray.com/core/v4/transport/pipe" ) // Bridge is a component in reverse proxy, that relays connections from Portal to local address. diff --git a/app/reverse/config.go b/app/reverse/config.go index 04259baee..5b057ee64 100644 --- a/app/reverse/config.go +++ b/app/reverse/config.go @@ -6,7 +6,7 @@ import ( "crypto/rand" "io" - "v2ray.com/core/common/dice" + "v2ray.com/core/v4/common/dice" ) func (c *Control) FillInRandom() { diff --git a/app/reverse/errors.generated.go b/app/reverse/errors.generated.go index e72207995..6bc3a865a 100644 --- a/app/reverse/errors.generated.go +++ b/app/reverse/errors.generated.go @@ -1,6 +1,6 @@ package reverse -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/reverse/portal.go b/app/reverse/portal.go index ed846fe0c..b8066d7b2 100644 --- a/app/reverse/portal.go +++ b/app/reverse/portal.go @@ -8,15 +8,15 @@ import ( "time" "github.com/golang/protobuf/proto" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/mux" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/common/task" - "v2ray.com/core/features/outbound" - "v2ray.com/core/transport" - "v2ray.com/core/transport/pipe" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/mux" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/common/task" + "v2ray.com/core/v4/features/outbound" + "v2ray.com/core/v4/transport" + "v2ray.com/core/v4/transport/pipe" ) type Portal struct { diff --git a/app/reverse/portal_test.go b/app/reverse/portal_test.go index aa4660a5b..b08a4e33c 100644 --- a/app/reverse/portal_test.go +++ b/app/reverse/portal_test.go @@ -3,8 +3,8 @@ package reverse_test import ( "testing" - "v2ray.com/core/app/reverse" - "v2ray.com/core/common" + "v2ray.com/core/v4/app/reverse" + "v2ray.com/core/v4/common" ) func TestStaticPickerEmpty(t *testing.T) { diff --git a/app/reverse/reverse.go b/app/reverse/reverse.go index 898a1850e..47828f912 100644 --- a/app/reverse/reverse.go +++ b/app/reverse/reverse.go @@ -7,12 +7,12 @@ package reverse import ( "context" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/net" - "v2ray.com/core/features/outbound" - "v2ray.com/core/features/routing" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/errors" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/features/outbound" + "v2ray.com/core/v4/features/routing" ) const ( diff --git a/app/router/balancing.go b/app/router/balancing.go index 0cede3922..84a47b827 100644 --- a/app/router/balancing.go +++ b/app/router/balancing.go @@ -3,8 +3,8 @@ package router import ( - "v2ray.com/core/common/dice" - "v2ray.com/core/features/outbound" + "v2ray.com/core/v4/common/dice" + "v2ray.com/core/v4/features/outbound" ) type BalancingStrategy interface { diff --git a/app/router/condition.go b/app/router/condition.go index 4a80471f5..438e9e305 100644 --- a/app/router/condition.go +++ b/app/router/condition.go @@ -8,8 +8,8 @@ import ( "go.starlark.net/starlark" "go.starlark.net/syntax" - "v2ray.com/core/common/net" - "v2ray.com/core/common/strmatcher" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/strmatcher" ) type Condition interface { diff --git a/app/router/condition_geoip.go b/app/router/condition_geoip.go index 2688bc38b..84e7dcf10 100644 --- a/app/router/condition_geoip.go +++ b/app/router/condition_geoip.go @@ -6,7 +6,7 @@ import ( "encoding/binary" "sort" - "v2ray.com/core/common/net" + "v2ray.com/core/v4/common/net" ) type ipv6 struct { diff --git a/app/router/condition_geoip_test.go b/app/router/condition_geoip_test.go index 38e053736..cdab14d78 100644 --- a/app/router/condition_geoip_test.go +++ b/app/router/condition_geoip_test.go @@ -6,11 +6,11 @@ import ( "testing" proto "github.com/golang/protobuf/proto" - "v2ray.com/core/app/router" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/platform" - "v2ray.com/core/common/platform/filesystem" + "v2ray.com/core/v4/app/router" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/platform" + "v2ray.com/core/v4/common/platform/filesystem" ) func init() { diff --git a/app/router/condition_test.go b/app/router/condition_test.go index 5655d7432..b2aa980cd 100644 --- a/app/router/condition_test.go +++ b/app/router/condition_test.go @@ -8,15 +8,15 @@ import ( proto "github.com/golang/protobuf/proto" - . "v2ray.com/core/app/router" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/net" - "v2ray.com/core/common/platform" - "v2ray.com/core/common/platform/filesystem" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/protocol/http" - "v2ray.com/core/common/session" + . "v2ray.com/core/v4/app/router" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/errors" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/platform" + "v2ray.com/core/v4/common/platform/filesystem" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/protocol/http" + "v2ray.com/core/v4/common/session" ) func init() { diff --git a/app/router/config.go b/app/router/config.go index 585bd1605..a902f86d6 100644 --- a/app/router/config.go +++ b/app/router/config.go @@ -3,8 +3,8 @@ package router import ( - "v2ray.com/core/common/net" - "v2ray.com/core/features/outbound" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/features/outbound" ) // CIDRList is an alias of []*CIDR to provide sort.Interface. diff --git a/app/router/config.pb.go b/app/router/config.pb.go index 7e566ffea..57cb539d1 100644 --- a/app/router/config.pb.go +++ b/app/router/config.pb.go @@ -4,7 +4,7 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - net "v2ray.com/core/common/net" + net "v2ray.com/core/v4/common/net" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/app/router/errors.generated.go b/app/router/errors.generated.go index 0bd943f5d..b0d4075ee 100644 --- a/app/router/errors.generated.go +++ b/app/router/errors.generated.go @@ -1,6 +1,6 @@ package router -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/router/router.go b/app/router/router.go index 542ff3d7b..128312fe9 100644 --- a/app/router/router.go +++ b/app/router/router.go @@ -7,13 +7,13 @@ package router import ( "context" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/features/dns" - "v2ray.com/core/features/outbound" - "v2ray.com/core/features/routing" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/features/dns" + "v2ray.com/core/v4/features/outbound" + "v2ray.com/core/v4/features/routing" ) func init() { diff --git a/app/router/router_test.go b/app/router/router_test.go index 0992e1c9a..dd8d51688 100644 --- a/app/router/router_test.go +++ b/app/router/router_test.go @@ -5,12 +5,12 @@ import ( "testing" "github.com/golang/mock/gomock" - . "v2ray.com/core/app/router" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/features/outbound" - "v2ray.com/core/testing/mocks" + . "v2ray.com/core/v4/app/router" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/features/outbound" + "v2ray.com/core/v4/testing/mocks" ) type mockOutboundManager struct { diff --git a/app/stats/command/command.go b/app/stats/command/command.go index 68bc8e462..c042e477b 100644 --- a/app/stats/command/command.go +++ b/app/stats/command/command.go @@ -11,11 +11,11 @@ import ( grpc "google.golang.org/grpc" - "v2ray.com/core" - "v2ray.com/core/app/stats" - "v2ray.com/core/common" - "v2ray.com/core/common/strmatcher" - feature_stats "v2ray.com/core/features/stats" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/stats" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/strmatcher" + feature_stats "v2ray.com/core/v4/features/stats" ) // statsServer is an implementation of StatsService. diff --git a/app/stats/command/command_test.go b/app/stats/command/command_test.go index d17104ace..9f927119e 100644 --- a/app/stats/command/command_test.go +++ b/app/stats/command/command_test.go @@ -7,9 +7,9 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "v2ray.com/core/app/stats" - . "v2ray.com/core/app/stats/command" - "v2ray.com/core/common" + "v2ray.com/core/v4/app/stats" + . "v2ray.com/core/v4/app/stats/command" + "v2ray.com/core/v4/common" ) func TestGetStats(t *testing.T) { diff --git a/app/stats/command/errors.generated.go b/app/stats/command/errors.generated.go index 66f780510..ce99c2a5d 100644 --- a/app/stats/command/errors.generated.go +++ b/app/stats/command/errors.generated.go @@ -1,6 +1,6 @@ package command -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/stats/config.go b/app/stats/config.go index e124b17a6..a7b065fea 100644 --- a/app/stats/config.go +++ b/app/stats/config.go @@ -5,7 +5,7 @@ package stats import ( "context" - "v2ray.com/core/common" + "v2ray.com/core/v4/common" ) func init() { diff --git a/app/stats/errors.generated.go b/app/stats/errors.generated.go index c2489bea1..8aa5e14ae 100644 --- a/app/stats/errors.generated.go +++ b/app/stats/errors.generated.go @@ -1,6 +1,6 @@ package stats -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/stats/stats.go b/app/stats/stats.go index d06cc39c5..5954ffb73 100644 --- a/app/stats/stats.go +++ b/app/stats/stats.go @@ -9,7 +9,7 @@ import ( "sync" "sync/atomic" - "v2ray.com/core/features/stats" + "v2ray.com/core/v4/features/stats" ) // Counter is an implementation of stats.Counter. diff --git a/app/stats/stats_test.go b/app/stats/stats_test.go index 2a0d9b91a..16e8c70e3 100644 --- a/app/stats/stats_test.go +++ b/app/stats/stats_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" - . "v2ray.com/core/app/stats" - "v2ray.com/core/common" - "v2ray.com/core/features/stats" + . "v2ray.com/core/v4/app/stats" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/features/stats" ) func TestInternface(t *testing.T) { diff --git a/common/bitmask/byte_test.go b/common/bitmask/byte_test.go index 7eb532b8b..5e6cbdd04 100644 --- a/common/bitmask/byte_test.go +++ b/common/bitmask/byte_test.go @@ -3,7 +3,7 @@ package bitmask_test import ( "testing" - . "v2ray.com/core/common/bitmask" + . "v2ray.com/core/v4/common/bitmask" ) func TestBitmaskByte(t *testing.T) { diff --git a/common/buf/buffer.go b/common/buf/buffer.go index bffdfdd7f..0eec23f5f 100644 --- a/common/buf/buffer.go +++ b/common/buf/buffer.go @@ -3,7 +3,7 @@ package buf import ( "io" - "v2ray.com/core/common/bytespool" + "v2ray.com/core/v4/common/bytespool" ) const ( diff --git a/common/buf/buffer_test.go b/common/buf/buffer_test.go index 61a25930f..f09fd3a2b 100644 --- a/common/buf/buffer_test.go +++ b/common/buf/buffer_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - . "v2ray.com/core/common/buf" + "v2ray.com/core/v4/common" + . "v2ray.com/core/v4/common/buf" ) func TestBufferClear(t *testing.T) { diff --git a/common/buf/copy.go b/common/buf/copy.go index 87a9518e4..25656fcca 100644 --- a/common/buf/copy.go +++ b/common/buf/copy.go @@ -4,8 +4,8 @@ import ( "io" "time" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/signal" + "v2ray.com/core/v4/common/errors" + "v2ray.com/core/v4/common/signal" ) type dataHandler func(MultiBuffer) diff --git a/common/buf/copy_test.go b/common/buf/copy_test.go index 5142a74d3..4d6df565e 100644 --- a/common/buf/copy_test.go +++ b/common/buf/copy_test.go @@ -7,9 +7,9 @@ import ( "github.com/golang/mock/gomock" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/errors" - "v2ray.com/core/testing/mocks" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/errors" + "v2ray.com/core/v4/testing/mocks" ) func TestReadError(t *testing.T) { diff --git a/common/buf/errors.generated.go b/common/buf/errors.generated.go index 5853cd0cf..eb1b85e3c 100644 --- a/common/buf/errors.generated.go +++ b/common/buf/errors.generated.go @@ -1,6 +1,6 @@ package buf -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/common/buf/io_test.go b/common/buf/io_test.go index 751dd6193..6891200e0 100644 --- a/common/buf/io_test.go +++ b/common/buf/io_test.go @@ -5,9 +5,9 @@ import ( "io" "testing" - . "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/testing/servers/tcp" + . "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/testing/servers/tcp" ) func TestWriterCreation(t *testing.T) { diff --git a/common/buf/multi_buffer.go b/common/buf/multi_buffer.go index 71ca773be..9ee265c22 100644 --- a/common/buf/multi_buffer.go +++ b/common/buf/multi_buffer.go @@ -3,9 +3,9 @@ package buf import ( "io" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/serial" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/errors" + "v2ray.com/core/v4/common/serial" ) // ReadAllToBytes reads all content from the reader into a byte array, until EOF. diff --git a/common/buf/multi_buffer_test.go b/common/buf/multi_buffer_test.go index 4e6923e7c..cc5324d0e 100644 --- a/common/buf/multi_buffer_test.go +++ b/common/buf/multi_buffer_test.go @@ -7,8 +7,8 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - . "v2ray.com/core/common/buf" + "v2ray.com/core/v4/common" + . "v2ray.com/core/v4/common/buf" ) func TestMultiBufferRead(t *testing.T) { diff --git a/common/buf/reader.go b/common/buf/reader.go index d28316545..a9934b0aa 100644 --- a/common/buf/reader.go +++ b/common/buf/reader.go @@ -3,8 +3,8 @@ package buf import ( "io" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/errors" ) func readOneUDP(r io.Reader) (*Buffer, error) { diff --git a/common/buf/reader_test.go b/common/buf/reader_test.go index 0f66c03ae..668194c10 100644 --- a/common/buf/reader_test.go +++ b/common/buf/reader_test.go @@ -5,9 +5,9 @@ import ( "strings" "testing" - "v2ray.com/core/common" - . "v2ray.com/core/common/buf" - "v2ray.com/core/transport/pipe" + "v2ray.com/core/v4/common" + . "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/transport/pipe" ) func TestBytesReaderWriteTo(t *testing.T) { diff --git a/common/buf/readv_reader.go b/common/buf/readv_reader.go index 66e03c27f..11e9bd6c6 100644 --- a/common/buf/readv_reader.go +++ b/common/buf/readv_reader.go @@ -7,7 +7,7 @@ import ( "runtime" "syscall" - "v2ray.com/core/common/platform" + "v2ray.com/core/v4/common/platform" ) type allocStrategy struct { diff --git a/common/buf/readv_test.go b/common/buf/readv_test.go index 190e83d0e..fc05df586 100644 --- a/common/buf/readv_test.go +++ b/common/buf/readv_test.go @@ -10,9 +10,9 @@ import ( "github.com/google/go-cmp/cmp" "golang.org/x/sync/errgroup" - "v2ray.com/core/common" - . "v2ray.com/core/common/buf" - "v2ray.com/core/testing/servers/tcp" + "v2ray.com/core/v4/common" + . "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/testing/servers/tcp" ) func TestReadvReader(t *testing.T) { diff --git a/common/buf/writer.go b/common/buf/writer.go index 8e22a16d6..ac59e1f96 100644 --- a/common/buf/writer.go +++ b/common/buf/writer.go @@ -5,8 +5,8 @@ import ( "net" "sync" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/errors" ) // BufferToBytesWriter is a Writer that writes alloc.Buffer into underlying writer. diff --git a/common/buf/writer_test.go b/common/buf/writer_test.go index 39df1ef0b..b27105b53 100644 --- a/common/buf/writer_test.go +++ b/common/buf/writer_test.go @@ -9,9 +9,9 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - . "v2ray.com/core/common/buf" - "v2ray.com/core/transport/pipe" + "v2ray.com/core/v4/common" + . "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/transport/pipe" ) func TestWriter(t *testing.T) { diff --git a/common/common.go b/common/common.go index b67f18709..bf27e5cef 100644 --- a/common/common.go +++ b/common/common.go @@ -2,7 +2,7 @@ // See each sub-package for detail. package common -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" //go:generate errorgen diff --git a/common/common_test.go b/common/common_test.go index 7b01f9ad7..152e7774f 100644 --- a/common/common_test.go +++ b/common/common_test.go @@ -4,7 +4,7 @@ import ( "errors" "testing" - . "v2ray.com/core/common" + . "v2ray.com/core/v4/common" ) func TestMust(t *testing.T) { diff --git a/common/crypto/aes.go b/common/crypto/aes.go index b2415b3e8..95276ba6a 100644 --- a/common/crypto/aes.go +++ b/common/crypto/aes.go @@ -4,7 +4,7 @@ import ( "crypto/aes" "crypto/cipher" - "v2ray.com/core/common" + "v2ray.com/core/v4/common" ) // NewAesDecryptionStream creates a new AES encryption stream based on given key and IV. diff --git a/common/crypto/auth.go b/common/crypto/auth.go index d1f1187d0..04ece4566 100644 --- a/common/crypto/auth.go +++ b/common/crypto/auth.go @@ -5,10 +5,10 @@ import ( "io" "math/rand" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/bytespool" - "v2ray.com/core/common/protocol" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/bytespool" + "v2ray.com/core/v4/common/protocol" ) type BytesGenerator func() []byte diff --git a/common/crypto/auth_test.go b/common/crypto/auth_test.go index 17a2f1b60..67662412a 100644 --- a/common/crypto/auth_test.go +++ b/common/crypto/auth_test.go @@ -10,10 +10,10 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - . "v2ray.com/core/common/crypto" - "v2ray.com/core/common/protocol" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + . "v2ray.com/core/v4/common/crypto" + "v2ray.com/core/v4/common/protocol" ) func TestAuthenticationReaderWriter(t *testing.T) { diff --git a/common/crypto/benchmark_test.go b/common/crypto/benchmark_test.go index c1c71d96f..960e491fc 100644 --- a/common/crypto/benchmark_test.go +++ b/common/crypto/benchmark_test.go @@ -4,7 +4,7 @@ import ( "crypto/cipher" "testing" - . "v2ray.com/core/common/crypto" + . "v2ray.com/core/v4/common/crypto" ) const benchSize = 1024 * 1024 diff --git a/common/crypto/chacha20.go b/common/crypto/chacha20.go index 85946acf2..0fee469e0 100644 --- a/common/crypto/chacha20.go +++ b/common/crypto/chacha20.go @@ -3,7 +3,7 @@ package crypto import ( "crypto/cipher" - "v2ray.com/core/common/crypto/internal" + "v2ray.com/core/v4/common/crypto/internal" ) // NewChaCha20Stream creates a new Chacha20 encryption/descryption stream based on give key and IV. diff --git a/common/crypto/chacha20_test.go b/common/crypto/chacha20_test.go index d7a7c6b7c..aec9b7311 100644 --- a/common/crypto/chacha20_test.go +++ b/common/crypto/chacha20_test.go @@ -7,8 +7,8 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - . "v2ray.com/core/common/crypto" + "v2ray.com/core/v4/common" + . "v2ray.com/core/v4/common/crypto" ) func mustDecodeHex(s string) []byte { diff --git a/common/crypto/chunk.go b/common/crypto/chunk.go index 164336d0f..c7ed17f82 100755 --- a/common/crypto/chunk.go +++ b/common/crypto/chunk.go @@ -4,8 +4,8 @@ import ( "encoding/binary" "io" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" ) // ChunkSizeDecoder is a utility class to decode size value from bytes. diff --git a/common/crypto/chunk_test.go b/common/crypto/chunk_test.go index 7fd71b583..8b8b3ae92 100644 --- a/common/crypto/chunk_test.go +++ b/common/crypto/chunk_test.go @@ -5,9 +5,9 @@ import ( "io" "testing" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - . "v2ray.com/core/common/crypto" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + . "v2ray.com/core/v4/common/crypto" ) func TestChunkStreamIO(t *testing.T) { diff --git a/common/crypto/errors.generated.go b/common/crypto/errors.generated.go index 88a2f2ad3..cf565c6ad 100644 --- a/common/crypto/errors.generated.go +++ b/common/crypto/errors.generated.go @@ -1,6 +1,6 @@ package crypto -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/common/crypto/io.go b/common/crypto/io.go index 19a3a25cf..ddde5b54c 100644 --- a/common/crypto/io.go +++ b/common/crypto/io.go @@ -4,7 +4,7 @@ import ( "crypto/cipher" "io" - "v2ray.com/core/common/buf" + "v2ray.com/core/v4/common/buf" ) type CryptionReader struct { diff --git a/common/dice/dice_test.go b/common/dice/dice_test.go index 09b1dd4d3..83809a002 100644 --- a/common/dice/dice_test.go +++ b/common/dice/dice_test.go @@ -4,7 +4,7 @@ import ( "math/rand" "testing" - . "v2ray.com/core/common/dice" + . "v2ray.com/core/v4/common/dice" ) func BenchmarkRoll1(b *testing.B) { diff --git a/common/errors.generated.go b/common/errors.generated.go index 0c5d71fd2..1e7d32c7b 100644 --- a/common/errors.generated.go +++ b/common/errors.generated.go @@ -1,6 +1,6 @@ package common -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/common/errors/errors.go b/common/errors/errors.go index bea455cc0..920898228 100644 --- a/common/errors/errors.go +++ b/common/errors/errors.go @@ -6,8 +6,8 @@ import ( "reflect" "strings" - "v2ray.com/core/common/log" - "v2ray.com/core/common/serial" + "v2ray.com/core/v4/common/log" + "v2ray.com/core/v4/common/serial" ) type hasInnerError interface { diff --git a/common/errors/errors_test.go b/common/errors/errors_test.go index b8228a1e1..20093b84c 100644 --- a/common/errors/errors_test.go +++ b/common/errors/errors_test.go @@ -7,8 +7,8 @@ import ( "github.com/google/go-cmp/cmp" - . "v2ray.com/core/common/errors" - "v2ray.com/core/common/log" + . "v2ray.com/core/v4/common/errors" + "v2ray.com/core/v4/common/log" ) func TestError(t *testing.T) { diff --git a/common/interfaces.go b/common/interfaces.go index 0e569b9fb..58af0cd15 100644 --- a/common/interfaces.go +++ b/common/interfaces.go @@ -1,6 +1,6 @@ package common -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" // Closable is the interface for objects that can release its resources. // diff --git a/common/log/access.go b/common/log/access.go index 41946c9b2..e02024afb 100644 --- a/common/log/access.go +++ b/common/log/access.go @@ -3,7 +3,7 @@ package log import ( "strings" - "v2ray.com/core/common/serial" + "v2ray.com/core/v4/common/serial" ) type AccessStatus string diff --git a/common/log/log.go b/common/log/log.go index 423901b73..a37be17c7 100644 --- a/common/log/log.go +++ b/common/log/log.go @@ -3,7 +3,7 @@ package log // import "v2ray.com/core/common/log" import ( "sync" - "v2ray.com/core/common/serial" + "v2ray.com/core/v4/common/serial" ) // Message is the interface for all log messages. diff --git a/common/log/log_test.go b/common/log/log_test.go index 63755e299..d6982ea50 100644 --- a/common/log/log_test.go +++ b/common/log/log_test.go @@ -5,8 +5,8 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common/log" - "v2ray.com/core/common/net" + "v2ray.com/core/v4/common/log" + "v2ray.com/core/v4/common/net" ) type testLogger struct { diff --git a/common/log/logger.go b/common/log/logger.go index 9a2591cb9..f142b3813 100644 --- a/common/log/logger.go +++ b/common/log/logger.go @@ -6,9 +6,9 @@ import ( "os" "time" - "v2ray.com/core/common/platform" - "v2ray.com/core/common/signal/done" - "v2ray.com/core/common/signal/semaphore" + "v2ray.com/core/v4/common/platform" + "v2ray.com/core/v4/common/signal/done" + "v2ray.com/core/v4/common/signal/semaphore" ) // Writer is the interface for writing logs. diff --git a/common/log/logger_test.go b/common/log/logger_test.go index b41f41dfd..09e7f6d40 100644 --- a/common/log/logger_test.go +++ b/common/log/logger_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - . "v2ray.com/core/common/log" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + . "v2ray.com/core/v4/common/log" ) func TestFileLogger(t *testing.T) { diff --git a/common/mux/client.go b/common/mux/client.go index 537f8a096..a20cfc5e0 100644 --- a/common/mux/client.go +++ b/common/mux/client.go @@ -6,18 +6,18 @@ import ( "sync" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal/done" - "v2ray.com/core/common/task" - "v2ray.com/core/proxy" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/pipe" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/errors" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/common/signal/done" + "v2ray.com/core/v4/common/task" + "v2ray.com/core/v4/proxy" + "v2ray.com/core/v4/transport" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/pipe" ) type ClientManager struct { diff --git a/common/mux/client_test.go b/common/mux/client_test.go index b39b2c6cb..33ac53ea1 100644 --- a/common/mux/client_test.go +++ b/common/mux/client_test.go @@ -6,14 +6,14 @@ import ( "time" "github.com/golang/mock/gomock" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/mux" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/testing/mocks" - "v2ray.com/core/transport" - "v2ray.com/core/transport/pipe" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/errors" + "v2ray.com/core/v4/common/mux" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/testing/mocks" + "v2ray.com/core/v4/transport" + "v2ray.com/core/v4/transport/pipe" ) func TestIncrementalPickerFailure(t *testing.T) { diff --git a/common/mux/errors.generated.go b/common/mux/errors.generated.go index 522a6e33b..806a5d54d 100644 --- a/common/mux/errors.generated.go +++ b/common/mux/errors.generated.go @@ -1,6 +1,6 @@ package mux -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/common/mux/frame.go b/common/mux/frame.go index 4d2ac0327..1caf7d93f 100644 --- a/common/mux/frame.go +++ b/common/mux/frame.go @@ -4,12 +4,12 @@ import ( "encoding/binary" "io" - "v2ray.com/core/common" - "v2ray.com/core/common/bitmask" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/bitmask" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" ) type SessionStatus byte diff --git a/common/mux/frame_test.go b/common/mux/frame_test.go index afbb3a157..842e4a712 100644 --- a/common/mux/frame_test.go +++ b/common/mux/frame_test.go @@ -3,10 +3,10 @@ package mux_test import ( "testing" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/mux" - "v2ray.com/core/common/net" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/mux" + "v2ray.com/core/v4/common/net" ) func BenchmarkFrameWrite(b *testing.B) { diff --git a/common/mux/mux_test.go b/common/mux/mux_test.go index 3d7f6fb79..73efc31ed 100644 --- a/common/mux/mux_test.go +++ b/common/mux/mux_test.go @@ -6,12 +6,12 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - . "v2ray.com/core/common/mux" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/transport/pipe" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + . "v2ray.com/core/v4/common/mux" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/transport/pipe" ) func readAll(reader buf.Reader) (buf.MultiBuffer, error) { diff --git a/common/mux/reader.go b/common/mux/reader.go index 478351620..f5e973e09 100644 --- a/common/mux/reader.go +++ b/common/mux/reader.go @@ -3,9 +3,9 @@ package mux import ( "io" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/crypto" - "v2ray.com/core/common/serial" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/crypto" + "v2ray.com/core/v4/common/serial" ) // PacketReader is an io.Reader that reads whole chunk of Mux frames every time. diff --git a/common/mux/server.go b/common/mux/server.go index 626a6fd11..dc314a438 100644 --- a/common/mux/server.go +++ b/common/mux/server.go @@ -4,17 +4,17 @@ import ( "context" "io" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/session" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport" - "v2ray.com/core/transport/pipe" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/errors" + "v2ray.com/core/v4/common/log" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/features/routing" + "v2ray.com/core/v4/transport" + "v2ray.com/core/v4/transport/pipe" ) type Server struct { diff --git a/common/mux/session.go b/common/mux/session.go index c0759f96f..c19baf0f4 100644 --- a/common/mux/session.go +++ b/common/mux/session.go @@ -3,9 +3,9 @@ package mux import ( "sync" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/protocol" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/protocol" ) type SessionManager struct { diff --git a/common/mux/session_test.go b/common/mux/session_test.go index 7fb659a5d..6d9ef67d2 100644 --- a/common/mux/session_test.go +++ b/common/mux/session_test.go @@ -3,7 +3,7 @@ package mux_test import ( "testing" - . "v2ray.com/core/common/mux" + . "v2ray.com/core/v4/common/mux" ) func TestSessionManagerAdd(t *testing.T) { diff --git a/common/mux/writer.go b/common/mux/writer.go index f3b3c1d35..9a25994df 100644 --- a/common/mux/writer.go +++ b/common/mux/writer.go @@ -1,11 +1,11 @@ package mux import ( - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" ) type Writer struct { diff --git a/common/net/address_test.go b/common/net/address_test.go index 8a4616307..3cdea04e9 100644 --- a/common/net/address_test.go +++ b/common/net/address_test.go @@ -6,7 +6,7 @@ import ( "github.com/google/go-cmp/cmp" - . "v2ray.com/core/common/net" + . "v2ray.com/core/v4/common/net" ) func TestAddressProperty(t *testing.T) { diff --git a/common/net/connection.go b/common/net/connection.go index 0540ce99a..3c80e12c1 100644 --- a/common/net/connection.go +++ b/common/net/connection.go @@ -7,9 +7,9 @@ import ( "net" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/signal/done" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/signal/done" ) type ConnectionOption func(*connection) diff --git a/common/net/destination_test.go b/common/net/destination_test.go index 3cfe915b9..c3340b681 100644 --- a/common/net/destination_test.go +++ b/common/net/destination_test.go @@ -5,7 +5,7 @@ import ( "github.com/google/go-cmp/cmp" - . "v2ray.com/core/common/net" + . "v2ray.com/core/v4/common/net" ) func TestDestinationProperty(t *testing.T) { diff --git a/common/net/errors.generated.go b/common/net/errors.generated.go index e3cf99fb4..dd3ca7931 100644 --- a/common/net/errors.generated.go +++ b/common/net/errors.generated.go @@ -1,6 +1,6 @@ package net -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/common/net/port_test.go b/common/net/port_test.go index f668e0ec8..910805b07 100644 --- a/common/net/port_test.go +++ b/common/net/port_test.go @@ -3,7 +3,7 @@ package net_test import ( "testing" - . "v2ray.com/core/common/net" + . "v2ray.com/core/v4/common/net" ) func TestPortRangeContains(t *testing.T) { diff --git a/common/platform/ctlcmd/ctlcmd.go b/common/platform/ctlcmd/ctlcmd.go index ed770b555..3fca74e04 100644 --- a/common/platform/ctlcmd/ctlcmd.go +++ b/common/platform/ctlcmd/ctlcmd.go @@ -5,8 +5,8 @@ import ( "os" "os/exec" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/platform" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/platform" ) //go:generate errorgen diff --git a/common/platform/ctlcmd/errors.generated.go b/common/platform/ctlcmd/errors.generated.go index 91233667c..a161f27ac 100644 --- a/common/platform/ctlcmd/errors.generated.go +++ b/common/platform/ctlcmd/errors.generated.go @@ -1,6 +1,6 @@ package ctlcmd -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/common/platform/filesystem/file.go b/common/platform/filesystem/file.go index b41f69492..6b6de0b7a 100644 --- a/common/platform/filesystem/file.go +++ b/common/platform/filesystem/file.go @@ -4,8 +4,8 @@ import ( "io" "os" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/platform" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/platform" ) type FileReaderFunc func(path string) (io.ReadCloser, error) diff --git a/common/platform/platform_test.go b/common/platform/platform_test.go index 8cdb51fea..a62306983 100644 --- a/common/platform/platform_test.go +++ b/common/platform/platform_test.go @@ -6,8 +6,8 @@ import ( "runtime" "testing" - "v2ray.com/core/common" - . "v2ray.com/core/common/platform" + "v2ray.com/core/v4/common" + . "v2ray.com/core/v4/common/platform" ) func TestNormalizeEnvName(t *testing.T) { diff --git a/common/protocol/address.go b/common/protocol/address.go index 150f643fb..d1622e87b 100644 --- a/common/protocol/address.go +++ b/common/protocol/address.go @@ -3,10 +3,10 @@ package protocol import ( "io" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/serial" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/serial" ) type AddressOption func(*option) diff --git a/common/protocol/address_test.go b/common/protocol/address_test.go index 8e9c19dfa..e4fd29504 100644 --- a/common/protocol/address_test.go +++ b/common/protocol/address_test.go @@ -6,10 +6,10 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - . "v2ray.com/core/common/protocol" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + . "v2ray.com/core/v4/common/protocol" ) func TestAddressReading(t *testing.T) { diff --git a/common/protocol/bittorrent/bittorrent.go b/common/protocol/bittorrent/bittorrent.go index a0285f23d..fd9f3860e 100644 --- a/common/protocol/bittorrent/bittorrent.go +++ b/common/protocol/bittorrent/bittorrent.go @@ -3,7 +3,7 @@ package bittorrent import ( "errors" - "v2ray.com/core/common" + "v2ray.com/core/v4/common" ) type SniffHeader struct { diff --git a/common/protocol/dns/errors.generated.go b/common/protocol/dns/errors.generated.go index ba70372f0..8058c1330 100644 --- a/common/protocol/dns/errors.generated.go +++ b/common/protocol/dns/errors.generated.go @@ -1,6 +1,6 @@ package dns -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/common/protocol/dns/io.go b/common/protocol/dns/io.go index e1a759326..f13169ec2 100644 --- a/common/protocol/dns/io.go +++ b/common/protocol/dns/io.go @@ -5,9 +5,9 @@ import ( "sync" "golang.org/x/net/dns/dnsmessage" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/serial" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/serial" ) func PackMessage(msg *dnsmessage.Message) (*buf.Buffer, error) { diff --git a/common/protocol/errors.generated.go b/common/protocol/errors.generated.go index 2b52880a3..d894269e9 100644 --- a/common/protocol/errors.generated.go +++ b/common/protocol/errors.generated.go @@ -1,6 +1,6 @@ package protocol -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/common/protocol/headers.go b/common/protocol/headers.go index 83a5fdd6d..f7fa928a4 100644 --- a/common/protocol/headers.go +++ b/common/protocol/headers.go @@ -3,9 +3,9 @@ package protocol import ( "runtime" - "v2ray.com/core/common/bitmask" - "v2ray.com/core/common/net" - "v2ray.com/core/common/uuid" + "v2ray.com/core/v4/common/bitmask" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/uuid" ) // RequestCommand is a custom command in a proxy request. diff --git a/common/protocol/http/headers.go b/common/protocol/http/headers.go index 95eb53066..8c9ccb746 100644 --- a/common/protocol/http/headers.go +++ b/common/protocol/http/headers.go @@ -5,7 +5,7 @@ import ( "strconv" "strings" - "v2ray.com/core/common/net" + "v2ray.com/core/v4/common/net" ) // ParseXForwardedFor parses X-Forwarded-For header in http headers, and return the IP list in it. diff --git a/common/protocol/http/headers_test.go b/common/protocol/http/headers_test.go index 5716d0752..2994600d7 100644 --- a/common/protocol/http/headers_test.go +++ b/common/protocol/http/headers_test.go @@ -8,9 +8,9 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - . "v2ray.com/core/common/protocol/http" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + . "v2ray.com/core/v4/common/protocol/http" ) func TestParseXForwardedFor(t *testing.T) { diff --git a/common/protocol/http/sniff.go b/common/protocol/http/sniff.go index 9974dd277..7732a81ce 100644 --- a/common/protocol/http/sniff.go +++ b/common/protocol/http/sniff.go @@ -5,8 +5,8 @@ import ( "errors" "strings" - "v2ray.com/core/common" - "v2ray.com/core/common/net" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" ) type version byte diff --git a/common/protocol/http/sniff_test.go b/common/protocol/http/sniff_test.go index 82f3b1ae9..223b9f43f 100644 --- a/common/protocol/http/sniff_test.go +++ b/common/protocol/http/sniff_test.go @@ -3,7 +3,7 @@ package http_test import ( "testing" - . "v2ray.com/core/common/protocol/http" + . "v2ray.com/core/v4/common/protocol/http" ) func TestHTTPHeaders(t *testing.T) { diff --git a/common/protocol/id.go b/common/protocol/id.go index f7a32e06f..a42b2acba 100755 --- a/common/protocol/id.go +++ b/common/protocol/id.go @@ -5,8 +5,8 @@ import ( "crypto/md5" "hash" - "v2ray.com/core/common" - "v2ray.com/core/common/uuid" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/uuid" ) const ( diff --git a/common/protocol/id_test.go b/common/protocol/id_test.go index bc55336dd..0aec36bfc 100644 --- a/common/protocol/id_test.go +++ b/common/protocol/id_test.go @@ -3,8 +3,8 @@ package protocol_test import ( "testing" - . "v2ray.com/core/common/protocol" - "v2ray.com/core/common/uuid" + . "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/uuid" ) func TestIdEquals(t *testing.T) { diff --git a/common/protocol/server_picker_test.go b/common/protocol/server_picker_test.go index 54fbbf43d..462a67d9c 100644 --- a/common/protocol/server_picker_test.go +++ b/common/protocol/server_picker_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "v2ray.com/core/common/net" - . "v2ray.com/core/common/protocol" + "v2ray.com/core/v4/common/net" + . "v2ray.com/core/v4/common/protocol" ) func TestServerList(t *testing.T) { diff --git a/common/protocol/server_spec.go b/common/protocol/server_spec.go index bcf05d691..0eb18b467 100644 --- a/common/protocol/server_spec.go +++ b/common/protocol/server_spec.go @@ -4,8 +4,8 @@ import ( "sync" "time" - "v2ray.com/core/common/dice" - "v2ray.com/core/common/net" + "v2ray.com/core/v4/common/dice" + "v2ray.com/core/v4/common/net" ) type ValidationStrategy interface { diff --git a/common/protocol/server_spec.pb.go b/common/protocol/server_spec.pb.go index 941abc4ef..36c006dd3 100644 --- a/common/protocol/server_spec.pb.go +++ b/common/protocol/server_spec.pb.go @@ -4,7 +4,7 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - net "v2ray.com/core/common/net" + net "v2ray.com/core/v4/common/net" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/common/protocol/server_spec_test.go b/common/protocol/server_spec_test.go index 47ecfe0a5..47c7b0d75 100644 --- a/common/protocol/server_spec_test.go +++ b/common/protocol/server_spec_test.go @@ -5,11 +5,11 @@ import ( "testing" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - . "v2ray.com/core/common/protocol" - "v2ray.com/core/common/uuid" - "v2ray.com/core/proxy/vmess" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + . "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/uuid" + "v2ray.com/core/v4/proxy/vmess" ) func TestAlwaysValidStrategy(t *testing.T) { diff --git a/common/protocol/time.go b/common/protocol/time.go index 0c0d145d8..e363e80de 100644 --- a/common/protocol/time.go +++ b/common/protocol/time.go @@ -3,7 +3,7 @@ package protocol import ( "time" - "v2ray.com/core/common/dice" + "v2ray.com/core/v4/common/dice" ) type Timestamp int64 diff --git a/common/protocol/time_test.go b/common/protocol/time_test.go index 6ddeed738..13b3e126d 100644 --- a/common/protocol/time_test.go +++ b/common/protocol/time_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - . "v2ray.com/core/common/protocol" + . "v2ray.com/core/v4/common/protocol" ) func TestGenerateRandomInt64InRange(t *testing.T) { diff --git a/common/protocol/tls/cert/cert.go b/common/protocol/tls/cert/cert.go index 36598c66a..b8c8da7a8 100644 --- a/common/protocol/tls/cert/cert.go +++ b/common/protocol/tls/cert/cert.go @@ -8,7 +8,7 @@ import ( "math/big" "time" - "v2ray.com/core/common" + "v2ray.com/core/v4/common" ) //go:generate errorgen diff --git a/common/protocol/tls/cert/errors.generated.go b/common/protocol/tls/cert/errors.generated.go index 9695be344..9ac14fd8f 100644 --- a/common/protocol/tls/cert/errors.generated.go +++ b/common/protocol/tls/cert/errors.generated.go @@ -1,6 +1,6 @@ package cert -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/common/protocol/tls/sniff.go b/common/protocol/tls/sniff.go index a4df5c796..fc100a252 100644 --- a/common/protocol/tls/sniff.go +++ b/common/protocol/tls/sniff.go @@ -5,7 +5,7 @@ import ( "errors" "strings" - "v2ray.com/core/common" + "v2ray.com/core/v4/common" ) type SniffHeader struct { diff --git a/common/protocol/tls/sniff_test.go b/common/protocol/tls/sniff_test.go index 9f11b490a..0a0a3b203 100644 --- a/common/protocol/tls/sniff_test.go +++ b/common/protocol/tls/sniff_test.go @@ -3,7 +3,7 @@ package tls_test import ( "testing" - . "v2ray.com/core/common/protocol/tls" + . "v2ray.com/core/v4/common/protocol/tls" ) func TestTLSHeaders(t *testing.T) { diff --git a/common/protocol/udp/packet.go b/common/protocol/udp/packet.go index 67bcf658b..6ddfcb8bc 100644 --- a/common/protocol/udp/packet.go +++ b/common/protocol/udp/packet.go @@ -1,8 +1,8 @@ package udp import ( - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" ) // Packet is a UDP packet together with its source and destination address. diff --git a/common/protocol/user.pb.go b/common/protocol/user.pb.go index f48a99ab6..e719dff21 100644 --- a/common/protocol/user.pb.go +++ b/common/protocol/user.pb.go @@ -4,7 +4,7 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - serial "v2ray.com/core/common/serial" + serial "v2ray.com/core/v4/common/serial" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/common/retry/errors.generated.go b/common/retry/errors.generated.go index db19a63d6..5cb5864e8 100644 --- a/common/retry/errors.generated.go +++ b/common/retry/errors.generated.go @@ -1,6 +1,6 @@ package retry -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/common/retry/retry_test.go b/common/retry/retry_test.go index ef278423d..fa189dcd0 100644 --- a/common/retry/retry_test.go +++ b/common/retry/retry_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" - . "v2ray.com/core/common/retry" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/errors" + . "v2ray.com/core/v4/common/retry" ) var ( diff --git a/common/serial/serial_test.go b/common/serial/serial_test.go index f74f96af5..0a79d35e7 100644 --- a/common/serial/serial_test.go +++ b/common/serial/serial_test.go @@ -6,9 +6,9 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/serial" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/serial" ) func TestUint16Serial(t *testing.T) { diff --git a/common/serial/string_test.go b/common/serial/string_test.go index 6fe8d99db..74809a460 100644 --- a/common/serial/string_test.go +++ b/common/serial/string_test.go @@ -6,7 +6,7 @@ import ( "github.com/google/go-cmp/cmp" - . "v2ray.com/core/common/serial" + . "v2ray.com/core/v4/common/serial" ) func TestToString(t *testing.T) { diff --git a/common/serial/typed_message_test.go b/common/serial/typed_message_test.go index e5f3abd1a..5ec4463fc 100644 --- a/common/serial/typed_message_test.go +++ b/common/serial/typed_message_test.go @@ -3,7 +3,7 @@ package serial_test import ( "testing" - . "v2ray.com/core/common/serial" + . "v2ray.com/core/v4/common/serial" ) func TestGetInstance(t *testing.T) { diff --git a/common/session/session.go b/common/session/session.go index 8ce25b552..283f54bc6 100644 --- a/common/session/session.go +++ b/common/session/session.go @@ -5,9 +5,9 @@ import ( "context" "math/rand" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" + "v2ray.com/core/v4/common/errors" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" ) // ID of a session. diff --git a/common/signal/notifier_test.go b/common/signal/notifier_test.go index 2b58acbb3..c03ef6f76 100644 --- a/common/signal/notifier_test.go +++ b/common/signal/notifier_test.go @@ -3,7 +3,7 @@ package signal_test import ( "testing" - . "v2ray.com/core/common/signal" + . "v2ray.com/core/v4/common/signal" ) func TestNotifierSignal(t *testing.T) { diff --git a/common/signal/pubsub/pubsub.go b/common/signal/pubsub/pubsub.go index e71ed8698..4c3f2ebd8 100644 --- a/common/signal/pubsub/pubsub.go +++ b/common/signal/pubsub/pubsub.go @@ -5,9 +5,9 @@ import ( "sync" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/signal/done" - "v2ray.com/core/common/task" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/signal/done" + "v2ray.com/core/v4/common/task" ) type Subscriber struct { diff --git a/common/signal/pubsub/pubsub_test.go b/common/signal/pubsub/pubsub_test.go index 40fda7ef2..6d5e5fafe 100644 --- a/common/signal/pubsub/pubsub_test.go +++ b/common/signal/pubsub/pubsub_test.go @@ -3,7 +3,7 @@ package pubsub_test import ( "testing" - . "v2ray.com/core/common/signal/pubsub" + . "v2ray.com/core/v4/common/signal/pubsub" ) func TestPubsub(t *testing.T) { diff --git a/common/signal/timer.go b/common/signal/timer.go index 4182d4b2d..1b180b88e 100644 --- a/common/signal/timer.go +++ b/common/signal/timer.go @@ -5,8 +5,8 @@ import ( "sync" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/task" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/task" ) type ActivityUpdater interface { diff --git a/common/signal/timer_test.go b/common/signal/timer_test.go index d8e0106c7..b9b702c2f 100644 --- a/common/signal/timer_test.go +++ b/common/signal/timer_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - . "v2ray.com/core/common/signal" + . "v2ray.com/core/v4/common/signal" ) func TestActivityTimer(t *testing.T) { diff --git a/common/strmatcher/benchmark_test.go b/common/strmatcher/benchmark_test.go index de5f5f626..c1a608750 100644 --- a/common/strmatcher/benchmark_test.go +++ b/common/strmatcher/benchmark_test.go @@ -4,8 +4,8 @@ import ( "strconv" "testing" - "v2ray.com/core/common" - . "v2ray.com/core/common/strmatcher" + "v2ray.com/core/v4/common" + . "v2ray.com/core/v4/common/strmatcher" ) func BenchmarkDomainMatcherGroup(b *testing.B) { diff --git a/common/strmatcher/domain_matcher_test.go b/common/strmatcher/domain_matcher_test.go index a6319740b..b13cb1ffe 100644 --- a/common/strmatcher/domain_matcher_test.go +++ b/common/strmatcher/domain_matcher_test.go @@ -3,7 +3,7 @@ package strmatcher_test import ( "testing" - . "v2ray.com/core/common/strmatcher" + . "v2ray.com/core/v4/common/strmatcher" ) func TestDomainMatcherGroup(t *testing.T) { diff --git a/common/strmatcher/full_matcher_test.go b/common/strmatcher/full_matcher_test.go index a19a60c77..2bf61b1ab 100644 --- a/common/strmatcher/full_matcher_test.go +++ b/common/strmatcher/full_matcher_test.go @@ -3,7 +3,7 @@ package strmatcher_test import ( "testing" - . "v2ray.com/core/common/strmatcher" + . "v2ray.com/core/v4/common/strmatcher" ) func TestFullMatcherGroup(t *testing.T) { diff --git a/common/strmatcher/matchers_test.go b/common/strmatcher/matchers_test.go index 4d615b143..5d403c113 100644 --- a/common/strmatcher/matchers_test.go +++ b/common/strmatcher/matchers_test.go @@ -3,8 +3,8 @@ package strmatcher_test import ( "testing" - "v2ray.com/core/common" - . "v2ray.com/core/common/strmatcher" + "v2ray.com/core/v4/common" + . "v2ray.com/core/v4/common/strmatcher" ) func TestMatcher(t *testing.T) { diff --git a/common/task/common.go b/common/task/common.go index 42d3b8abe..08311d81f 100644 --- a/common/task/common.go +++ b/common/task/common.go @@ -1,6 +1,6 @@ package task -import "v2ray.com/core/common" +import "v2ray.com/core/v4/common" // Close returns a func() that closes v. func Close(v interface{}) func() error { diff --git a/common/task/periodic_test.go b/common/task/periodic_test.go index 3a4708043..7b978c9ac 100644 --- a/common/task/periodic_test.go +++ b/common/task/periodic_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "v2ray.com/core/common" - . "v2ray.com/core/common/task" + "v2ray.com/core/v4/common" + . "v2ray.com/core/v4/common/task" ) func TestPeriodicTaskStop(t *testing.T) { diff --git a/common/task/task.go b/common/task/task.go index 1fc52be50..08d404d1d 100644 --- a/common/task/task.go +++ b/common/task/task.go @@ -3,7 +3,7 @@ package task import ( "context" - "v2ray.com/core/common/signal/semaphore" + "v2ray.com/core/v4/common/signal/semaphore" ) // OnSuccess executes g() after f() returns nil. diff --git a/common/task/task_test.go b/common/task/task_test.go index 0a9b87bb1..da575206d 100644 --- a/common/task/task_test.go +++ b/common/task/task_test.go @@ -9,8 +9,8 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - . "v2ray.com/core/common/task" + "v2ray.com/core/v4/common" + . "v2ray.com/core/v4/common/task" ) func TestExecuteParallel(t *testing.T) { diff --git a/common/type_test.go b/common/type_test.go index cd99155ef..a4fffa817 100644 --- a/common/type_test.go +++ b/common/type_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - . "v2ray.com/core/common" + . "v2ray.com/core/v4/common" ) type TConfig struct { diff --git a/common/uuid/uuid.go b/common/uuid/uuid.go index 9679942a0..1e1184c7c 100755 --- a/common/uuid/uuid.go +++ b/common/uuid/uuid.go @@ -5,8 +5,8 @@ import ( "crypto/rand" "encoding/hex" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/errors" ) var ( diff --git a/common/uuid/uuid_test.go b/common/uuid/uuid_test.go index 695406086..396095cc4 100644 --- a/common/uuid/uuid_test.go +++ b/common/uuid/uuid_test.go @@ -5,8 +5,8 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - . "v2ray.com/core/common/uuid" + "v2ray.com/core/v4/common" + . "v2ray.com/core/v4/common/uuid" ) func TestParseBytes(t *testing.T) { diff --git a/config.go b/config.go index d328a87bd..91b823b7a 100755 --- a/config.go +++ b/config.go @@ -7,8 +7,8 @@ import ( "strings" "github.com/golang/protobuf/proto" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" ) // ConfigFormat is a configurable format of V2Ray config file. diff --git a/config.pb.go b/config.pb.go index 8369c0a25..52ce76e60 100644 --- a/config.pb.go +++ b/config.pb.go @@ -4,8 +4,8 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - serial "v2ray.com/core/common/serial" - transport "v2ray.com/core/transport" + serial "v2ray.com/core/v4/common/serial" + transport "v2ray.com/core/v4/transport" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/context_test.go b/context_test.go index f66b30858..24f8ba0c3 100644 --- a/context_test.go +++ b/context_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - . "v2ray.com/core" + . "v2ray.com/core/v4" ) func TestContextPanic(t *testing.T) { diff --git a/core.go b/core.go index f703fc591..e016bf3c1 100755 --- a/core.go +++ b/core.go @@ -13,7 +13,7 @@ package core //go:generate errorgen import ( - "v2ray.com/core/common/serial" + "v2ray.com/core/v4/common/serial" ) const ( diff --git a/errors.generated.go b/errors.generated.go index 2f4c8644f..a2480af71 100644 --- a/errors.generated.go +++ b/errors.generated.go @@ -1,6 +1,6 @@ package core -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/external/github.com/cloudflare/sidh/p503/arith_decl.go b/external/github.com/cloudflare/sidh/p503/arith_decl.go index 2929561d2..7c52993f0 100644 --- a/external/github.com/cloudflare/sidh/p503/arith_decl.go +++ b/external/github.com/cloudflare/sidh/p503/arith_decl.go @@ -3,7 +3,7 @@ package p503 import ( - . "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny" + . "v2ray.com/core/v4/external/github.com/cloudflare/sidh/internal/isogeny" ) // If choice = 0, leave x,y unchanged. If choice = 1, set x,y = y,x. diff --git a/external/github.com/cloudflare/sidh/p503/consts.go b/external/github.com/cloudflare/sidh/p503/consts.go index fddf6be62..a3b570af2 100644 --- a/external/github.com/cloudflare/sidh/p503/consts.go +++ b/external/github.com/cloudflare/sidh/p503/consts.go @@ -1,8 +1,8 @@ package p503 import ( - . "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny" - cpu "v2ray.com/core/external/github.com/cloudflare/sidh/internal/utils" + . "v2ray.com/core/v4/external/github.com/cloudflare/sidh/internal/isogeny" + cpu "v2ray.com/core/v4/external/github.com/cloudflare/sidh/internal/utils" ) const ( diff --git a/external/github.com/cloudflare/sidh/p503/field_ops.go b/external/github.com/cloudflare/sidh/p503/field_ops.go index 04223d608..eb6fbfac1 100644 --- a/external/github.com/cloudflare/sidh/p503/field_ops.go +++ b/external/github.com/cloudflare/sidh/p503/field_ops.go @@ -1,7 +1,7 @@ package p503 import ( - . "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny" + . "v2ray.com/core/v4/external/github.com/cloudflare/sidh/internal/isogeny" ) type fp503Ops struct{} diff --git a/external/github.com/cloudflare/sidh/p751/arith_decl.go b/external/github.com/cloudflare/sidh/p751/arith_decl.go index 6c48f4dd7..ee4add8d4 100644 --- a/external/github.com/cloudflare/sidh/p751/arith_decl.go +++ b/external/github.com/cloudflare/sidh/p751/arith_decl.go @@ -3,7 +3,7 @@ package p751 import ( - . "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny" + . "v2ray.com/core/v4/external/github.com/cloudflare/sidh/internal/isogeny" ) // If choice = 0, leave x,y unchanged. If choice = 1, set x,y = y,x. diff --git a/external/github.com/cloudflare/sidh/p751/consts.go b/external/github.com/cloudflare/sidh/p751/consts.go index 57e49faae..dbd1bcdd3 100644 --- a/external/github.com/cloudflare/sidh/p751/consts.go +++ b/external/github.com/cloudflare/sidh/p751/consts.go @@ -1,8 +1,8 @@ package p751 import ( - . "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny" - cpu "v2ray.com/core/external/github.com/cloudflare/sidh/internal/utils" + . "v2ray.com/core/v4/external/github.com/cloudflare/sidh/internal/isogeny" + cpu "v2ray.com/core/v4/external/github.com/cloudflare/sidh/internal/utils" ) const ( diff --git a/external/github.com/cloudflare/sidh/p751/field_ops.go b/external/github.com/cloudflare/sidh/p751/field_ops.go index c416c74ac..e67ee38ab 100644 --- a/external/github.com/cloudflare/sidh/p751/field_ops.go +++ b/external/github.com/cloudflare/sidh/p751/field_ops.go @@ -1,6 +1,6 @@ package p751 -import . "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny" +import . "v2ray.com/core/v4/external/github.com/cloudflare/sidh/internal/isogeny" // 2*p751 var () diff --git a/external/github.com/cloudflare/sidh/sidh/api.go b/external/github.com/cloudflare/sidh/sidh/api.go index 50dd13712..8ff0898fc 100644 --- a/external/github.com/cloudflare/sidh/sidh/api.go +++ b/external/github.com/cloudflare/sidh/sidh/api.go @@ -2,8 +2,8 @@ package sidh import ( "errors" - . "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny" "io" + . "v2ray.com/core/v4/external/github.com/cloudflare/sidh/internal/isogeny" ) // I keep it bool in order to be able to apply logical NOT diff --git a/external/github.com/cloudflare/sidh/sidh/params.go b/external/github.com/cloudflare/sidh/sidh/params.go index d1e2c3912..6fb088d46 100644 --- a/external/github.com/cloudflare/sidh/sidh/params.go +++ b/external/github.com/cloudflare/sidh/sidh/params.go @@ -1,9 +1,9 @@ package sidh import ( - . "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny" - p503 "v2ray.com/core/external/github.com/cloudflare/sidh/p503" - p751 "v2ray.com/core/external/github.com/cloudflare/sidh/p751" + . "v2ray.com/core/v4/external/github.com/cloudflare/sidh/internal/isogeny" + p503 "v2ray.com/core/v4/external/github.com/cloudflare/sidh/p503" + p751 "v2ray.com/core/v4/external/github.com/cloudflare/sidh/p751" ) // Keeps mapping: SIDH prime field ID to domain parameters diff --git a/external/github.com/cloudflare/sidh/sidh/sidh.go b/external/github.com/cloudflare/sidh/sidh/sidh.go index 17177484c..2922eb8da 100644 --- a/external/github.com/cloudflare/sidh/sidh/sidh.go +++ b/external/github.com/cloudflare/sidh/sidh/sidh.go @@ -1,7 +1,7 @@ package sidh import ( - . "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny" + . "v2ray.com/core/v4/external/github.com/cloudflare/sidh/internal/isogeny" ) // ----------------------------------------------------------------------------- diff --git a/external/github.com/lucas-clemente/quic-go/buffer_pool.go b/external/github.com/lucas-clemente/quic-go/buffer_pool.go index 2966dbd70..561ca11e7 100644 --- a/external/github.com/lucas-clemente/quic-go/buffer_pool.go +++ b/external/github.com/lucas-clemente/quic-go/buffer_pool.go @@ -3,8 +3,8 @@ package quic import ( "sync" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/common/bytespool" + "v2ray.com/core/v4/common/bytespool" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" ) type packetBuffer struct { diff --git a/external/github.com/lucas-clemente/quic-go/client.go b/external/github.com/lucas-clemente/quic-go/client.go index 18391fd4f..3a8236e31 100644 --- a/external/github.com/lucas-clemente/quic-go/client.go +++ b/external/github.com/lucas-clemente/quic-go/client.go @@ -7,11 +7,11 @@ import ( "net" "sync" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/handshake" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/handshake" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/qerr" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) type client struct { diff --git a/external/github.com/lucas-clemente/quic-go/crypto_stream.go b/external/github.com/lucas-clemente/quic-go/crypto_stream.go index 806347f7d..c68d7ef19 100644 --- a/external/github.com/lucas-clemente/quic-go/crypto_stream.go +++ b/external/github.com/lucas-clemente/quic-go/crypto_stream.go @@ -5,9 +5,9 @@ import ( "fmt" "io" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) type cryptoStream interface { diff --git a/external/github.com/lucas-clemente/quic-go/crypto_stream_manager.go b/external/github.com/lucas-clemente/quic-go/crypto_stream_manager.go index 526c98aa4..7c91abe1a 100644 --- a/external/github.com/lucas-clemente/quic-go/crypto_stream_manager.go +++ b/external/github.com/lucas-clemente/quic-go/crypto_stream_manager.go @@ -3,8 +3,8 @@ package quic import ( "fmt" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) type cryptoDataHandler interface { diff --git a/external/github.com/lucas-clemente/quic-go/frame_sorter.go b/external/github.com/lucas-clemente/quic-go/frame_sorter.go index 087265e2e..fbb55fe3e 100644 --- a/external/github.com/lucas-clemente/quic-go/frame_sorter.go +++ b/external/github.com/lucas-clemente/quic-go/frame_sorter.go @@ -3,8 +3,8 @@ package quic import ( "errors" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) type frameSorter struct { diff --git a/external/github.com/lucas-clemente/quic-go/framer.go b/external/github.com/lucas-clemente/quic-go/framer.go index 88b14ad91..3a259a628 100644 --- a/external/github.com/lucas-clemente/quic-go/framer.go +++ b/external/github.com/lucas-clemente/quic-go/framer.go @@ -3,8 +3,8 @@ package quic import ( "sync" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) type framer interface { diff --git a/external/github.com/lucas-clemente/quic-go/interface.go b/external/github.com/lucas-clemente/quic-go/interface.go index 5b52e8366..380865b4e 100644 --- a/external/github.com/lucas-clemente/quic-go/interface.go +++ b/external/github.com/lucas-clemente/quic-go/interface.go @@ -6,8 +6,8 @@ import ( "net" "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/handshake" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/handshake" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" ) // The StreamID is the ID of a QUIC stream. diff --git a/external/github.com/lucas-clemente/quic-go/internal/ackhandler/interfaces.go b/external/github.com/lucas-clemente/quic-go/internal/ackhandler/interfaces.go index b839cba1a..ea6e88153 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/ackhandler/interfaces.go +++ b/external/github.com/lucas-clemente/quic-go/internal/ackhandler/interfaces.go @@ -3,8 +3,8 @@ package ackhandler import ( "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) // SentPacketHandler handles ACKs received for outgoing packets diff --git a/external/github.com/lucas-clemente/quic-go/internal/ackhandler/packet.go b/external/github.com/lucas-clemente/quic-go/internal/ackhandler/packet.go index 53e668774..39e157489 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/ackhandler/packet.go +++ b/external/github.com/lucas-clemente/quic-go/internal/ackhandler/packet.go @@ -3,8 +3,8 @@ package ackhandler import ( "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) // A Packet is a packet diff --git a/external/github.com/lucas-clemente/quic-go/internal/ackhandler/packet_number_generator.go b/external/github.com/lucas-clemente/quic-go/internal/ackhandler/packet_number_generator.go index 9d613792d..96b99a0ff 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/ackhandler/packet_number_generator.go +++ b/external/github.com/lucas-clemente/quic-go/internal/ackhandler/packet_number_generator.go @@ -4,8 +4,8 @@ import ( "crypto/rand" "math" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) // The packetNumberGenerator generates the packet number for the next packet diff --git a/external/github.com/lucas-clemente/quic-go/internal/ackhandler/received_packet_handler.go b/external/github.com/lucas-clemente/quic-go/internal/ackhandler/received_packet_handler.go index 0b1719b29..ea639b98f 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/ackhandler/received_packet_handler.go +++ b/external/github.com/lucas-clemente/quic-go/internal/ackhandler/received_packet_handler.go @@ -4,10 +4,10 @@ import ( "fmt" "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/congestion" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/congestion" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) const ( diff --git a/external/github.com/lucas-clemente/quic-go/internal/ackhandler/received_packet_history.go b/external/github.com/lucas-clemente/quic-go/internal/ackhandler/received_packet_history.go index 4519a1da7..b1aa45809 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/ackhandler/received_packet_history.go +++ b/external/github.com/lucas-clemente/quic-go/internal/ackhandler/received_packet_history.go @@ -1,10 +1,10 @@ package ackhandler import ( - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/qerr" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) // The receivedPacketHistory stores if a packet number has already been received. diff --git a/external/github.com/lucas-clemente/quic-go/internal/ackhandler/received_packet_tracker.go b/external/github.com/lucas-clemente/quic-go/internal/ackhandler/received_packet_tracker.go index 0863ab5ef..6171d0da6 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/ackhandler/received_packet_tracker.go +++ b/external/github.com/lucas-clemente/quic-go/internal/ackhandler/received_packet_tracker.go @@ -3,10 +3,10 @@ package ackhandler import ( "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/congestion" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/congestion" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) type receivedPacketTracker struct { diff --git a/external/github.com/lucas-clemente/quic-go/internal/ackhandler/retransmittable.go b/external/github.com/lucas-clemente/quic-go/internal/ackhandler/retransmittable.go index 18971750b..35bcb08dc 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/ackhandler/retransmittable.go +++ b/external/github.com/lucas-clemente/quic-go/internal/ackhandler/retransmittable.go @@ -1,6 +1,6 @@ package ackhandler -import "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" +import "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" // Returns a new slice with all non-retransmittable frames deleted. func stripNonRetransmittableFrames(fs []wire.Frame) []wire.Frame { diff --git a/external/github.com/lucas-clemente/quic-go/internal/ackhandler/sent_packet_handler.go b/external/github.com/lucas-clemente/quic-go/internal/ackhandler/sent_packet_handler.go index 83ddc8c99..776ba6df4 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/ackhandler/sent_packet_handler.go +++ b/external/github.com/lucas-clemente/quic-go/internal/ackhandler/sent_packet_handler.go @@ -6,11 +6,11 @@ import ( "math" "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/congestion" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/congestion" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/qerr" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) const ( diff --git a/external/github.com/lucas-clemente/quic-go/internal/ackhandler/sent_packet_history.go b/external/github.com/lucas-clemente/quic-go/internal/ackhandler/sent_packet_history.go index 0b85993f2..db13819df 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/ackhandler/sent_packet_history.go +++ b/external/github.com/lucas-clemente/quic-go/internal/ackhandler/sent_packet_history.go @@ -3,7 +3,7 @@ package ackhandler import ( "fmt" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" ) type sentPacketHistory struct { diff --git a/external/github.com/lucas-clemente/quic-go/internal/congestion/bandwidth.go b/external/github.com/lucas-clemente/quic-go/internal/congestion/bandwidth.go index aff34ddb6..99cf085b4 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/congestion/bandwidth.go +++ b/external/github.com/lucas-clemente/quic-go/internal/congestion/bandwidth.go @@ -3,7 +3,7 @@ package congestion import ( "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" ) // Bandwidth of a connection diff --git a/external/github.com/lucas-clemente/quic-go/internal/congestion/cubic.go b/external/github.com/lucas-clemente/quic-go/internal/congestion/cubic.go index 6b32e9bd2..5d10ca1a3 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/congestion/cubic.go +++ b/external/github.com/lucas-clemente/quic-go/internal/congestion/cubic.go @@ -4,8 +4,8 @@ import ( "math" "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) // This cubic implementation is based on the one found in Chromiums's QUIC diff --git a/external/github.com/lucas-clemente/quic-go/internal/congestion/cubic_sender.go b/external/github.com/lucas-clemente/quic-go/internal/congestion/cubic_sender.go index 9eb898644..e23036a84 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/congestion/cubic_sender.go +++ b/external/github.com/lucas-clemente/quic-go/internal/congestion/cubic_sender.go @@ -3,8 +3,8 @@ package congestion import ( "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) const ( diff --git a/external/github.com/lucas-clemente/quic-go/internal/congestion/hybrid_slow_start.go b/external/github.com/lucas-clemente/quic-go/internal/congestion/hybrid_slow_start.go index 890ee4069..6d41de8f7 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/congestion/hybrid_slow_start.go +++ b/external/github.com/lucas-clemente/quic-go/internal/congestion/hybrid_slow_start.go @@ -3,8 +3,8 @@ package congestion import ( "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) // Note(pwestin): the magic clamping numbers come from the original code in diff --git a/external/github.com/lucas-clemente/quic-go/internal/congestion/interface.go b/external/github.com/lucas-clemente/quic-go/internal/congestion/interface.go index e3d80b425..8bde1a539 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/congestion/interface.go +++ b/external/github.com/lucas-clemente/quic-go/internal/congestion/interface.go @@ -3,7 +3,7 @@ package congestion import ( "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" ) // A SendAlgorithm performs congestion control and calculates the congestion window diff --git a/external/github.com/lucas-clemente/quic-go/internal/congestion/prr_sender.go b/external/github.com/lucas-clemente/quic-go/internal/congestion/prr_sender.go index 3febd7bac..7654be82d 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/congestion/prr_sender.go +++ b/external/github.com/lucas-clemente/quic-go/internal/congestion/prr_sender.go @@ -1,7 +1,7 @@ package congestion import ( - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" ) // PrrSender implements the Proportional Rate Reduction (PRR) per RFC 6937 diff --git a/external/github.com/lucas-clemente/quic-go/internal/congestion/rtt_stats.go b/external/github.com/lucas-clemente/quic-go/internal/congestion/rtt_stats.go index 146f03d8e..e49ec6383 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/congestion/rtt_stats.go +++ b/external/github.com/lucas-clemente/quic-go/internal/congestion/rtt_stats.go @@ -3,7 +3,7 @@ package congestion import ( "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) const ( diff --git a/external/github.com/lucas-clemente/quic-go/internal/congestion/stats.go b/external/github.com/lucas-clemente/quic-go/internal/congestion/stats.go index 7bb1942b2..170202e16 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/congestion/stats.go +++ b/external/github.com/lucas-clemente/quic-go/internal/congestion/stats.go @@ -1,6 +1,6 @@ package congestion -import "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" +import "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" type connectionStats struct { slowstartPacketsLost protocol.PacketNumber diff --git a/external/github.com/lucas-clemente/quic-go/internal/crypto/AEAD.go b/external/github.com/lucas-clemente/quic-go/internal/crypto/AEAD.go index 5c2dfd530..155bc0c61 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/crypto/AEAD.go +++ b/external/github.com/lucas-clemente/quic-go/internal/crypto/AEAD.go @@ -1,6 +1,6 @@ package crypto -import "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" +import "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" // An AEAD implements QUIC's authenticated encryption and associated data type AEAD interface { diff --git a/external/github.com/lucas-clemente/quic-go/internal/crypto/aesgcm_aead.go b/external/github.com/lucas-clemente/quic-go/internal/crypto/aesgcm_aead.go index 961df50d9..cb473b4c6 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/crypto/aesgcm_aead.go +++ b/external/github.com/lucas-clemente/quic-go/internal/crypto/aesgcm_aead.go @@ -6,7 +6,7 @@ import ( "encoding/binary" "errors" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" ) type aeadAESGCM struct { diff --git a/external/github.com/lucas-clemente/quic-go/internal/crypto/null_aead_aesgcm.go b/external/github.com/lucas-clemente/quic-go/internal/crypto/null_aead_aesgcm.go index 33687e312..df89c20ad 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/crypto/null_aead_aesgcm.go +++ b/external/github.com/lucas-clemente/quic-go/internal/crypto/null_aead_aesgcm.go @@ -3,7 +3,7 @@ package crypto import ( "crypto" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" ) var quicVersion1Salt = []byte{0x9c, 0x10, 0x8f, 0x98, 0x52, 0x0a, 0x5c, 0x5c, 0x32, 0x96, 0x8e, 0x95, 0x0e, 0x8a, 0x2c, 0x5f, 0xe0, 0x6d, 0x6c, 0x38} diff --git a/external/github.com/lucas-clemente/quic-go/internal/flowcontrol/base_flow_controller.go b/external/github.com/lucas-clemente/quic-go/internal/flowcontrol/base_flow_controller.go index 0091930b5..5ed50bedc 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/flowcontrol/base_flow_controller.go +++ b/external/github.com/lucas-clemente/quic-go/internal/flowcontrol/base_flow_controller.go @@ -4,9 +4,9 @@ import ( "sync" "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/congestion" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/congestion" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) type baseFlowController struct { diff --git a/external/github.com/lucas-clemente/quic-go/internal/flowcontrol/connection_flow_controller.go b/external/github.com/lucas-clemente/quic-go/internal/flowcontrol/connection_flow_controller.go index 1dd3fb7a3..f6a08191e 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/flowcontrol/connection_flow_controller.go +++ b/external/github.com/lucas-clemente/quic-go/internal/flowcontrol/connection_flow_controller.go @@ -3,10 +3,10 @@ package flowcontrol import ( "fmt" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/congestion" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/congestion" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/qerr" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) type connectionFlowController struct { diff --git a/external/github.com/lucas-clemente/quic-go/internal/flowcontrol/interface.go b/external/github.com/lucas-clemente/quic-go/internal/flowcontrol/interface.go index 5293e8771..f2a41c092 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/flowcontrol/interface.go +++ b/external/github.com/lucas-clemente/quic-go/internal/flowcontrol/interface.go @@ -1,6 +1,6 @@ package flowcontrol -import "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" +import "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" type flowController interface { // for sending diff --git a/external/github.com/lucas-clemente/quic-go/internal/flowcontrol/stream_flow_controller.go b/external/github.com/lucas-clemente/quic-go/internal/flowcontrol/stream_flow_controller.go index 7ae61d983..b3cb60e13 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/flowcontrol/stream_flow_controller.go +++ b/external/github.com/lucas-clemente/quic-go/internal/flowcontrol/stream_flow_controller.go @@ -3,10 +3,10 @@ package flowcontrol import ( "fmt" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/congestion" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/congestion" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/qerr" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) type streamFlowController struct { diff --git a/external/github.com/lucas-clemente/quic-go/internal/handshake/aead.go b/external/github.com/lucas-clemente/quic-go/internal/handshake/aead.go index ba8ddbd3e..39a8a6457 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/handshake/aead.go +++ b/external/github.com/lucas-clemente/quic-go/internal/handshake/aead.go @@ -4,7 +4,7 @@ import ( "crypto/cipher" "encoding/binary" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" ) type sealer struct { diff --git a/external/github.com/lucas-clemente/quic-go/internal/handshake/cookie_generator.go b/external/github.com/lucas-clemente/quic-go/internal/handshake/cookie_generator.go index ae77f3568..6ff07e49e 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/handshake/cookie_generator.go +++ b/external/github.com/lucas-clemente/quic-go/internal/handshake/cookie_generator.go @@ -6,7 +6,7 @@ import ( "net" "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" ) const ( diff --git a/external/github.com/lucas-clemente/quic-go/internal/handshake/crypto_setup.go b/external/github.com/lucas-clemente/quic-go/internal/handshake/crypto_setup.go index bd0ef776a..02d7d403b 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/handshake/crypto_setup.go +++ b/external/github.com/lucas-clemente/quic-go/internal/handshake/crypto_setup.go @@ -7,9 +7,9 @@ import ( "fmt" "io" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" - "v2ray.com/core/external/github.com/marten-seemann/qtls" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/marten-seemann/qtls" ) type messageType uint8 diff --git a/external/github.com/lucas-clemente/quic-go/internal/handshake/initial_aead.go b/external/github.com/lucas-clemente/quic-go/internal/handshake/initial_aead.go index 92cce873c..cd1e9def3 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/handshake/initial_aead.go +++ b/external/github.com/lucas-clemente/quic-go/internal/handshake/initial_aead.go @@ -4,8 +4,8 @@ import ( "crypto" "crypto/aes" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/marten-seemann/qtls" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/marten-seemann/qtls" ) var quicVersion1Salt = []byte{0xef, 0x4f, 0xb0, 0xab, 0xb4, 0x74, 0x70, 0xc4, 0x1b, 0xef, 0xcf, 0x80, 0x31, 0x33, 0x4f, 0xae, 0x48, 0x5e, 0x09, 0xa0} diff --git a/external/github.com/lucas-clemente/quic-go/internal/handshake/interface.go b/external/github.com/lucas-clemente/quic-go/internal/handshake/interface.go index 3f6a6f8a0..059fd471d 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/handshake/interface.go +++ b/external/github.com/lucas-clemente/quic-go/internal/handshake/interface.go @@ -4,8 +4,8 @@ import ( "crypto/x509" "io" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/marten-seemann/qtls" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/marten-seemann/qtls" ) // Opener opens a packet diff --git a/external/github.com/lucas-clemente/quic-go/internal/handshake/qtls.go b/external/github.com/lucas-clemente/quic-go/internal/handshake/qtls.go index 23543b5c0..8f04943eb 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/handshake/qtls.go +++ b/external/github.com/lucas-clemente/quic-go/internal/handshake/qtls.go @@ -3,7 +3,7 @@ package handshake import ( "crypto/tls" - "v2ray.com/core/external/github.com/marten-seemann/qtls" + "v2ray.com/core/v4/external/github.com/marten-seemann/qtls" ) func tlsConfigToQtlsConfig(c *tls.Config) *qtls.Config { diff --git a/external/github.com/lucas-clemente/quic-go/internal/handshake/tls_extension.go b/external/github.com/lucas-clemente/quic-go/internal/handshake/tls_extension.go index 894ad7e4d..9819cd634 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/handshake/tls_extension.go +++ b/external/github.com/lucas-clemente/quic-go/internal/handshake/tls_extension.go @@ -6,8 +6,8 @@ import ( "errors" "fmt" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) const quicTLSExtensionType = 0xffa5 diff --git a/external/github.com/lucas-clemente/quic-go/internal/handshake/tls_extension_handler_client.go b/external/github.com/lucas-clemente/quic-go/internal/handshake/tls_extension_handler_client.go index 8a6869594..df4698a6e 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/handshake/tls_extension_handler_client.go +++ b/external/github.com/lucas-clemente/quic-go/internal/handshake/tls_extension_handler_client.go @@ -4,10 +4,10 @@ import ( "errors" "fmt" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" - "v2ray.com/core/external/github.com/marten-seemann/qtls" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/qerr" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/marten-seemann/qtls" ) type extensionHandlerClient struct { diff --git a/external/github.com/lucas-clemente/quic-go/internal/handshake/tls_extension_handler_server.go b/external/github.com/lucas-clemente/quic-go/internal/handshake/tls_extension_handler_server.go index 7159a2ff8..746c9aad4 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/handshake/tls_extension_handler_server.go +++ b/external/github.com/lucas-clemente/quic-go/internal/handshake/tls_extension_handler_server.go @@ -3,10 +3,10 @@ package handshake import ( "errors" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" - "v2ray.com/core/external/github.com/marten-seemann/qtls" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/qerr" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/marten-seemann/qtls" ) type extensionHandlerServer struct { diff --git a/external/github.com/lucas-clemente/quic-go/internal/handshake/transport_parameters.go b/external/github.com/lucas-clemente/quic-go/internal/handshake/transport_parameters.go index 2477c37a0..573670a8e 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/handshake/transport_parameters.go +++ b/external/github.com/lucas-clemente/quic-go/internal/handshake/transport_parameters.go @@ -8,8 +8,8 @@ import ( "sort" "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) type transportParameterID uint16 diff --git a/external/github.com/lucas-clemente/quic-go/internal/utils/linkedlist/linkedlist.go b/external/github.com/lucas-clemente/quic-go/internal/utils/linkedlist/linkedlist.go index 06d32959c..64e643cc9 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/utils/linkedlist/linkedlist.go +++ b/external/github.com/lucas-clemente/quic-go/internal/utils/linkedlist/linkedlist.go @@ -1,6 +1,6 @@ package linkedlist -import "v2ray.com/core/external/github.com/cheekybits/genny/generic" +import "v2ray.com/core/v4/external/github.com/cheekybits/genny/generic" // Linked list implementation from the Go standard library. diff --git a/external/github.com/lucas-clemente/quic-go/internal/utils/minmax.go b/external/github.com/lucas-clemente/quic-go/internal/utils/minmax.go index d245ea7d3..2743b9dfc 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/utils/minmax.go +++ b/external/github.com/lucas-clemente/quic-go/internal/utils/minmax.go @@ -4,7 +4,7 @@ import ( "math" "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" ) // InfDuration is a duration of infinite length diff --git a/external/github.com/lucas-clemente/quic-go/internal/utils/packet_interval.go b/external/github.com/lucas-clemente/quic-go/internal/utils/packet_interval.go index 7e5707dcf..75ff2c81f 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/utils/packet_interval.go +++ b/external/github.com/lucas-clemente/quic-go/internal/utils/packet_interval.go @@ -1,6 +1,6 @@ package utils -import "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" +import "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" // PacketInterval is an interval from one PacketNumber to the other type PacketInterval struct { diff --git a/external/github.com/lucas-clemente/quic-go/internal/utils/streamframe_interval.go b/external/github.com/lucas-clemente/quic-go/internal/utils/streamframe_interval.go index b1bc82b5f..b1ae6a9a6 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/utils/streamframe_interval.go +++ b/external/github.com/lucas-clemente/quic-go/internal/utils/streamframe_interval.go @@ -1,6 +1,6 @@ package utils -import "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" +import "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" // ByteInterval is an interval from one ByteCount to the other type ByteInterval struct { diff --git a/external/github.com/lucas-clemente/quic-go/internal/utils/varint.go b/external/github.com/lucas-clemente/quic-go/internal/utils/varint.go index 2cf839298..f15dc3945 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/utils/varint.go +++ b/external/github.com/lucas-clemente/quic-go/internal/utils/varint.go @@ -5,7 +5,7 @@ import ( "fmt" "io" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" ) // taken from the QUIC draft diff --git a/external/github.com/lucas-clemente/quic-go/internal/utils/varint_packetnumber.go b/external/github.com/lucas-clemente/quic-go/internal/utils/varint_packetnumber.go index b220b4a24..75cb4b4fe 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/utils/varint_packetnumber.go +++ b/external/github.com/lucas-clemente/quic-go/internal/utils/varint_packetnumber.go @@ -4,7 +4,7 @@ import ( "bytes" "fmt" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" ) // ReadVarIntPacketNumber reads a number in the QUIC varint packet number format diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/ack_frame.go b/external/github.com/lucas-clemente/quic-go/internal/wire/ack_frame.go index 4af3de98e..c032c6320 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/ack_frame.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/ack_frame.go @@ -6,8 +6,8 @@ import ( "sort" "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) // TODO: use the value sent in the transport parameters diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/ack_range.go b/external/github.com/lucas-clemente/quic-go/internal/wire/ack_range.go index a4d3dff6b..55472ed6c 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/ack_range.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/ack_range.go @@ -1,6 +1,6 @@ package wire -import "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" +import "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" // AckRange is an ACK range type AckRange struct { diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/connection_close_frame.go b/external/github.com/lucas-clemente/quic-go/internal/wire/connection_close_frame.go index 624f066d5..cb63eda2b 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/connection_close_frame.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/connection_close_frame.go @@ -4,9 +4,9 @@ import ( "bytes" "io" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/qerr" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) // A ConnectionCloseFrame is a CONNECTION_CLOSE frame diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/crypto_frame.go b/external/github.com/lucas-clemente/quic-go/internal/wire/crypto_frame.go index c3aacb728..829a128b4 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/crypto_frame.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/crypto_frame.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) // A CryptoFrame is a CRYPTO frame diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/data_blocked_frame.go b/external/github.com/lucas-clemente/quic-go/internal/wire/data_blocked_frame.go index 66b7760c6..2b685de7f 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/data_blocked_frame.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/data_blocked_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) // A DataBlockedFrame is a DATA_BLOCKED frame diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/extended_header.go b/external/github.com/lucas-clemente/quic-go/internal/wire/extended_header.go index 814ddd280..cb28cc535 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/extended_header.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/extended_header.go @@ -6,8 +6,8 @@ import ( "fmt" "io" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) // ExtendedHeader is the header of a QUIC packet. diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/frame.go b/external/github.com/lucas-clemente/quic-go/internal/wire/frame.go index 4e2050071..aaa9fad59 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/frame.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/frame.go @@ -3,7 +3,7 @@ package wire import ( "bytes" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" ) // A Frame in QUIC diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/frame_parser.go b/external/github.com/lucas-clemente/quic-go/internal/wire/frame_parser.go index 3762a3392..b2602d9e4 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/frame_parser.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/frame_parser.go @@ -4,8 +4,8 @@ import ( "bytes" "fmt" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/qerr" ) // ParseNextFrame parses the next frame diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/header.go b/external/github.com/lucas-clemente/quic-go/internal/wire/header.go index 68f652ab8..0f5d35754 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/header.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/header.go @@ -5,9 +5,9 @@ import ( "errors" "io" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/qerr" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) // The Header is the version independent part of the header diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/log.go b/external/github.com/lucas-clemente/quic-go/internal/wire/log.go index 8a72410bd..5a0422a85 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/log.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/log.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) // LogFrame logs a frame, either sent or received diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/max_data_frame.go b/external/github.com/lucas-clemente/quic-go/internal/wire/max_data_frame.go index ba0a3a25f..aa4885ce4 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/max_data_frame.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/max_data_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) // A MaxDataFrame carries flow control information for the connection diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/max_stream_data_frame.go b/external/github.com/lucas-clemente/quic-go/internal/wire/max_stream_data_frame.go index b13944e45..7cef72ec3 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/max_stream_data_frame.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/max_stream_data_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) // A MaxStreamDataFrame is a MAX_STREAM_DATA frame diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/max_streams_frame.go b/external/github.com/lucas-clemente/quic-go/internal/wire/max_streams_frame.go index 63cfae257..763dec3d4 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/max_streams_frame.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/max_streams_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) // A MaxStreamsFrame is a MAX_STREAMS frame diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/new_connection_id_frame.go b/external/github.com/lucas-clemente/quic-go/internal/wire/new_connection_id_frame.go index 73893438c..d0b8e8fac 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/new_connection_id_frame.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/new_connection_id_frame.go @@ -5,9 +5,9 @@ import ( "fmt" "io" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" ) // A NewConnectionIDFrame is a NEW_CONNECTION_ID frame diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/new_token_frame.go b/external/github.com/lucas-clemente/quic-go/internal/wire/new_token_frame.go index 2cf4db636..d250a259d 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/new_token_frame.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/new_token_frame.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) // A NewTokenFrame is a NEW_TOKEN frame diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/path_challenge_frame.go b/external/github.com/lucas-clemente/quic-go/internal/wire/path_challenge_frame.go index 074cc053c..5cf87cdea 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/path_challenge_frame.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/path_challenge_frame.go @@ -4,7 +4,7 @@ import ( "bytes" "io" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" ) // A PathChallengeFrame is a PATH_CHALLENGE frame diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/path_response_frame.go b/external/github.com/lucas-clemente/quic-go/internal/wire/path_response_frame.go index 2b385bc7d..013b21dd2 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/path_response_frame.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/path_response_frame.go @@ -4,7 +4,7 @@ import ( "bytes" "io" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" ) // A PathResponseFrame is a PATH_RESPONSE frame diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/ping_frame.go b/external/github.com/lucas-clemente/quic-go/internal/wire/ping_frame.go index f9b0bfcd1..b5bfdae0f 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/ping_frame.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/ping_frame.go @@ -3,7 +3,7 @@ package wire import ( "bytes" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" ) // A PingFrame is a PING frame diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/reset_stream_frame.go b/external/github.com/lucas-clemente/quic-go/internal/wire/reset_stream_frame.go index b1ed65e05..af5e440be 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/reset_stream_frame.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/reset_stream_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) // A ResetStreamFrame is a RESET_STREAM frame in QUIC diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/retire_connection_id_frame.go b/external/github.com/lucas-clemente/quic-go/internal/wire/retire_connection_id_frame.go index 50230f6d7..805511f4b 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/retire_connection_id_frame.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/retire_connection_id_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) // A RetireConnectionIDFrame is a RETIRE_CONNECTION_ID frame diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/stop_sending_frame.go b/external/github.com/lucas-clemente/quic-go/internal/wire/stop_sending_frame.go index f71a476c1..5c0df46aa 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/stop_sending_frame.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/stop_sending_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) // A StopSendingFrame is a STOP_SENDING frame diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/stream_data_blocked_frame.go b/external/github.com/lucas-clemente/quic-go/internal/wire/stream_data_blocked_frame.go index 4c6e58058..4cb7e94e9 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/stream_data_blocked_frame.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/stream_data_blocked_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) // A StreamDataBlockedFrame is a STREAM_DATA_BLOCKED frame diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/stream_frame.go b/external/github.com/lucas-clemente/quic-go/internal/wire/stream_frame.go index 2f5900ce8..a0403a13f 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/stream_frame.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/stream_frame.go @@ -5,9 +5,9 @@ import ( "errors" "io" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/qerr" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) // A StreamFrame of QUIC diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/streams_blocked_frame.go b/external/github.com/lucas-clemente/quic-go/internal/wire/streams_blocked_frame.go index 516706af3..b15f5b8f6 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/streams_blocked_frame.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/streams_blocked_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) // A StreamsBlockedFrame is a STREAMS_BLOCKED frame diff --git a/external/github.com/lucas-clemente/quic-go/internal/wire/version_negotiation.go b/external/github.com/lucas-clemente/quic-go/internal/wire/version_negotiation.go index e09ebf758..50981ae70 100644 --- a/external/github.com/lucas-clemente/quic-go/internal/wire/version_negotiation.go +++ b/external/github.com/lucas-clemente/quic-go/internal/wire/version_negotiation.go @@ -4,8 +4,8 @@ import ( "bytes" "crypto/rand" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) // ComposeVersionNegotiation composes a Version Negotiation diff --git a/external/github.com/lucas-clemente/quic-go/multiplexer.go b/external/github.com/lucas-clemente/quic-go/multiplexer.go index 3d5e2372e..44ed7cfbf 100644 --- a/external/github.com/lucas-clemente/quic-go/multiplexer.go +++ b/external/github.com/lucas-clemente/quic-go/multiplexer.go @@ -5,7 +5,7 @@ import ( "net" "sync" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) var ( diff --git a/external/github.com/lucas-clemente/quic-go/packet_handler_map.go b/external/github.com/lucas-clemente/quic-go/packet_handler_map.go index 3ea76d6ed..60e784934 100644 --- a/external/github.com/lucas-clemente/quic-go/packet_handler_map.go +++ b/external/github.com/lucas-clemente/quic-go/packet_handler_map.go @@ -8,9 +8,9 @@ import ( "sync" "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) type packetHandlerEntry struct { diff --git a/external/github.com/lucas-clemente/quic-go/packet_packer.go b/external/github.com/lucas-clemente/quic-go/packet_packer.go index 406f54871..a1344c389 100644 --- a/external/github.com/lucas-clemente/quic-go/packet_packer.go +++ b/external/github.com/lucas-clemente/quic-go/packet_packer.go @@ -7,11 +7,11 @@ import ( "net" "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/ackhandler" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/handshake" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/ackhandler" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/handshake" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) type packer interface { diff --git a/external/github.com/lucas-clemente/quic-go/packet_unpacker.go b/external/github.com/lucas-clemente/quic-go/packet_unpacker.go index 2257503aa..1589ac7e3 100644 --- a/external/github.com/lucas-clemente/quic-go/packet_unpacker.go +++ b/external/github.com/lucas-clemente/quic-go/packet_unpacker.go @@ -4,10 +4,10 @@ import ( "bytes" "fmt" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/handshake" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/handshake" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) type unpackedPacket struct { diff --git a/external/github.com/lucas-clemente/quic-go/receive_stream.go b/external/github.com/lucas-clemente/quic-go/receive_stream.go index 5d1999c91..aa5c524d9 100644 --- a/external/github.com/lucas-clemente/quic-go/receive_stream.go +++ b/external/github.com/lucas-clemente/quic-go/receive_stream.go @@ -6,10 +6,10 @@ import ( "sync" "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/flowcontrol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/flowcontrol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) type receiveStreamI interface { diff --git a/external/github.com/lucas-clemente/quic-go/send_stream.go b/external/github.com/lucas-clemente/quic-go/send_stream.go index 97849b1cf..8b9ab5269 100644 --- a/external/github.com/lucas-clemente/quic-go/send_stream.go +++ b/external/github.com/lucas-clemente/quic-go/send_stream.go @@ -6,10 +6,10 @@ import ( "sync" "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/flowcontrol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/flowcontrol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) type sendStreamI interface { diff --git a/external/github.com/lucas-clemente/quic-go/server.go b/external/github.com/lucas-clemente/quic-go/server.go index 8ee500145..52b894631 100644 --- a/external/github.com/lucas-clemente/quic-go/server.go +++ b/external/github.com/lucas-clemente/quic-go/server.go @@ -11,11 +11,11 @@ import ( "sync/atomic" "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/handshake" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/handshake" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/qerr" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) // packetHandler handles packets diff --git a/external/github.com/lucas-clemente/quic-go/server_session.go b/external/github.com/lucas-clemente/quic-go/server_session.go index 2c1fd4028..5bf346272 100644 --- a/external/github.com/lucas-clemente/quic-go/server_session.go +++ b/external/github.com/lucas-clemente/quic-go/server_session.go @@ -3,8 +3,8 @@ package quic import ( "fmt" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" ) type serverSession struct { diff --git a/external/github.com/lucas-clemente/quic-go/session.go b/external/github.com/lucas-clemente/quic-go/session.go index dc75628ef..c3ff70f36 100644 --- a/external/github.com/lucas-clemente/quic-go/session.go +++ b/external/github.com/lucas-clemente/quic-go/session.go @@ -12,14 +12,14 @@ import ( "sync" "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/ackhandler" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/congestion" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/flowcontrol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/handshake" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/ackhandler" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/congestion" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/flowcontrol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/handshake" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/qerr" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/utils" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) type unpacker interface { diff --git a/external/github.com/lucas-clemente/quic-go/stream.go b/external/github.com/lucas-clemente/quic-go/stream.go index 80d2d9b39..09e9c5a03 100644 --- a/external/github.com/lucas-clemente/quic-go/stream.go +++ b/external/github.com/lucas-clemente/quic-go/stream.go @@ -5,9 +5,9 @@ import ( "sync" "time" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/flowcontrol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/flowcontrol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) const errorCodeStopping protocol.ApplicationErrorCode = 0 diff --git a/external/github.com/lucas-clemente/quic-go/streams_map.go b/external/github.com/lucas-clemente/quic-go/streams_map.go index ceffbd17b..3a0610e48 100644 --- a/external/github.com/lucas-clemente/quic-go/streams_map.go +++ b/external/github.com/lucas-clemente/quic-go/streams_map.go @@ -5,10 +5,10 @@ import ( "fmt" "net" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/flowcontrol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/handshake" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/flowcontrol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/handshake" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) type streamOpenErr struct{ error } diff --git a/external/github.com/lucas-clemente/quic-go/streams_map_generic_helper.go b/external/github.com/lucas-clemente/quic-go/streams_map_generic_helper.go index b7235022c..dd4970fd9 100644 --- a/external/github.com/lucas-clemente/quic-go/streams_map_generic_helper.go +++ b/external/github.com/lucas-clemente/quic-go/streams_map_generic_helper.go @@ -1,9 +1,9 @@ package quic import ( - "v2ray.com/core/external/github.com/cheekybits/genny/generic" + "v2ray.com/core/v4/external/github.com/cheekybits/genny/generic" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" ) // In the auto-generated streams maps, we need to be able to close the streams. diff --git a/external/github.com/lucas-clemente/quic-go/streams_map_incoming_bidi.go b/external/github.com/lucas-clemente/quic-go/streams_map_incoming_bidi.go index 74880798d..056b857fa 100644 --- a/external/github.com/lucas-clemente/quic-go/streams_map_incoming_bidi.go +++ b/external/github.com/lucas-clemente/quic-go/streams_map_incoming_bidi.go @@ -8,8 +8,8 @@ import ( "fmt" "sync" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) type incomingBidiStreamsMap struct { diff --git a/external/github.com/lucas-clemente/quic-go/streams_map_incoming_generic.go b/external/github.com/lucas-clemente/quic-go/streams_map_incoming_generic.go index 3ab5a6cf8..1fc6d5a2a 100644 --- a/external/github.com/lucas-clemente/quic-go/streams_map_incoming_generic.go +++ b/external/github.com/lucas-clemente/quic-go/streams_map_incoming_generic.go @@ -4,8 +4,8 @@ import ( "fmt" "sync" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) //go:generate genny -in $GOFILE -out streams_map_incoming_bidi.go gen "item=streamI Item=BidiStream streamTypeGeneric=protocol.StreamTypeBidi" diff --git a/external/github.com/lucas-clemente/quic-go/streams_map_incoming_uni.go b/external/github.com/lucas-clemente/quic-go/streams_map_incoming_uni.go index 28a0b0ddc..8f55f7b20 100644 --- a/external/github.com/lucas-clemente/quic-go/streams_map_incoming_uni.go +++ b/external/github.com/lucas-clemente/quic-go/streams_map_incoming_uni.go @@ -8,8 +8,8 @@ import ( "fmt" "sync" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) type incomingUniStreamsMap struct { diff --git a/external/github.com/lucas-clemente/quic-go/streams_map_outgoing_bidi.go b/external/github.com/lucas-clemente/quic-go/streams_map_outgoing_bidi.go index ac602190a..3f04329dd 100644 --- a/external/github.com/lucas-clemente/quic-go/streams_map_outgoing_bidi.go +++ b/external/github.com/lucas-clemente/quic-go/streams_map_outgoing_bidi.go @@ -8,9 +8,9 @@ import ( "fmt" "sync" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/qerr" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) type outgoingBidiStreamsMap struct { diff --git a/external/github.com/lucas-clemente/quic-go/streams_map_outgoing_generic.go b/external/github.com/lucas-clemente/quic-go/streams_map_outgoing_generic.go index 0ac554793..22d175e5b 100644 --- a/external/github.com/lucas-clemente/quic-go/streams_map_outgoing_generic.go +++ b/external/github.com/lucas-clemente/quic-go/streams_map_outgoing_generic.go @@ -4,9 +4,9 @@ import ( "fmt" "sync" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/qerr" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) //go:generate genny -in $GOFILE -out streams_map_outgoing_bidi.go gen "item=streamI Item=BidiStream streamTypeGeneric=protocol.StreamTypeBidi" diff --git a/external/github.com/lucas-clemente/quic-go/streams_map_outgoing_uni.go b/external/github.com/lucas-clemente/quic-go/streams_map_outgoing_uni.go index a6f1feb40..65d44c822 100644 --- a/external/github.com/lucas-clemente/quic-go/streams_map_outgoing_uni.go +++ b/external/github.com/lucas-clemente/quic-go/streams_map_outgoing_uni.go @@ -8,9 +8,9 @@ import ( "fmt" "sync" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/qerr" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) type outgoingUniStreamsMap struct { diff --git a/external/github.com/lucas-clemente/quic-go/window_update_queue.go b/external/github.com/lucas-clemente/quic-go/window_update_queue.go index 808d6048f..ded2b6bd2 100644 --- a/external/github.com/lucas-clemente/quic-go/window_update_queue.go +++ b/external/github.com/lucas-clemente/quic-go/window_update_queue.go @@ -3,9 +3,9 @@ package quic import ( "sync" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/flowcontrol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/flowcontrol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/protocol" + "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go/internal/wire" ) type windowUpdateQueue struct { diff --git a/external/github.com/marten-seemann/qtls/13.go b/external/github.com/marten-seemann/qtls/13.go index 715dc6157..d174c54f2 100644 --- a/external/github.com/marten-seemann/qtls/13.go +++ b/external/github.com/marten-seemann/qtls/13.go @@ -22,8 +22,8 @@ import ( "sync/atomic" "time" - "v2ray.com/core/external/github.com/cloudflare/sidh/sidh" "golang.org/x/crypto/curve25519" + "v2ray.com/core/v4/external/github.com/cloudflare/sidh/sidh" ) // numSessionTickets is the number of different session tickets the diff --git a/features/dns/client.go b/features/dns/client.go index 76f635916..3ba9409f8 100644 --- a/features/dns/client.go +++ b/features/dns/client.go @@ -1,10 +1,10 @@ package dns import ( - "v2ray.com/core/common/errors" - "v2ray.com/core/common/net" - "v2ray.com/core/common/serial" - "v2ray.com/core/features" + "v2ray.com/core/v4/common/errors" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/features" ) // Client is a V2Ray feature for querying DNS information. diff --git a/features/dns/localdns/client.go b/features/dns/localdns/client.go index 025719075..fdcd11879 100644 --- a/features/dns/localdns/client.go +++ b/features/dns/localdns/client.go @@ -1,8 +1,8 @@ package localdns import ( - "v2ray.com/core/common/net" - "v2ray.com/core/features/dns" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/features/dns" ) // Client is an implementation of dns.Client, which queries localhost for DNS. diff --git a/features/errors.generated.go b/features/errors.generated.go index 7c1082afc..6c5dce687 100644 --- a/features/errors.generated.go +++ b/features/errors.generated.go @@ -1,6 +1,6 @@ package features -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/features/feature.go b/features/feature.go index ac7b77a71..5cbf2dd55 100644 --- a/features/feature.go +++ b/features/feature.go @@ -1,6 +1,6 @@ package features -import "v2ray.com/core/common" +import "v2ray.com/core/v4/common" //go:generate errorgen diff --git a/features/inbound/inbound.go b/features/inbound/inbound.go index 31b8048c2..32fcb12e7 100644 --- a/features/inbound/inbound.go +++ b/features/inbound/inbound.go @@ -3,9 +3,9 @@ package inbound import ( "context" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/features" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/features" ) // Handler is the interface for handlers that process inbound connections. diff --git a/features/outbound/outbound.go b/features/outbound/outbound.go index 05ba07589..ed4236ba3 100644 --- a/features/outbound/outbound.go +++ b/features/outbound/outbound.go @@ -3,9 +3,9 @@ package outbound import ( "context" - "v2ray.com/core/common" - "v2ray.com/core/features" - "v2ray.com/core/transport" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/features" + "v2ray.com/core/v4/transport" ) // Handler is the interface for handlers that process outbound connections. diff --git a/features/policy/policy.go b/features/policy/policy.go index 5d581fe2e..be0e2c4e3 100644 --- a/features/policy/policy.go +++ b/features/policy/policy.go @@ -5,8 +5,8 @@ import ( "runtime" "time" - "v2ray.com/core/common/platform" - "v2ray.com/core/features" + "v2ray.com/core/v4/common/platform" + "v2ray.com/core/v4/features" ) // Timeout contains limits for connection timeout. diff --git a/features/routing/dispatcher.go b/features/routing/dispatcher.go index 8d4df342f..19ceda12d 100644 --- a/features/routing/dispatcher.go +++ b/features/routing/dispatcher.go @@ -3,9 +3,9 @@ package routing import ( "context" - "v2ray.com/core/common/net" - "v2ray.com/core/features" - "v2ray.com/core/transport" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/features" + "v2ray.com/core/v4/transport" ) // Dispatcher is a feature that dispatches inbound requests to outbound handlers based on rules. diff --git a/features/routing/router.go b/features/routing/router.go index a71927b88..b03f6cb9c 100644 --- a/features/routing/router.go +++ b/features/routing/router.go @@ -3,8 +3,8 @@ package routing import ( "context" - "v2ray.com/core/common" - "v2ray.com/core/features" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/features" ) // Router is a feature to choose an outbound tag for the given request. diff --git a/features/stats/errors.generated.go b/features/stats/errors.generated.go index c2489bea1..8aa5e14ae 100644 --- a/features/stats/errors.generated.go +++ b/features/stats/errors.generated.go @@ -1,6 +1,6 @@ package stats -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/features/stats/stats.go b/features/stats/stats.go index fed80eb83..f5ede1880 100644 --- a/features/stats/stats.go +++ b/features/stats/stats.go @@ -2,7 +2,7 @@ package stats //go:generate errorgen -import "v2ray.com/core/features" +import "v2ray.com/core/v4/features" // Counter is the interface for stats counters. // diff --git a/functions.go b/functions.go index 2ea4aa456..05c8aa0da 100644 --- a/functions.go +++ b/functions.go @@ -6,10 +6,10 @@ import ( "bytes" "context" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport/internet/udp" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/features/routing" + "v2ray.com/core/v4/transport/internet/udp" ) // CreateObject creates a new object based on the given V2Ray instance and config. The V2Ray instance may be nil. diff --git a/functions_test.go b/functions_test.go index 4fd3112e2..b4ed9650b 100644 --- a/functions_test.go +++ b/functions_test.go @@ -10,15 +10,15 @@ import ( "github.com/golang/protobuf/proto" "github.com/google/go-cmp/cmp" - "v2ray.com/core" - "v2ray.com/core/app/dispatcher" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/testing/servers/udp" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/dispatcher" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/proxy/freedom" + "v2ray.com/core/v4/testing/servers/tcp" + "v2ray.com/core/v4/testing/servers/udp" ) func xor(b []byte) []byte { diff --git a/go.mod b/go.mod index 888cd2ba1..fe8527cb9 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module v2ray.com/core +module v2ray.com/core/v4 require ( github.com/golang/mock v1.2.0 diff --git a/infra/conf/api.go b/infra/conf/api.go index 4ddfe37b6..f21619dc3 100644 --- a/infra/conf/api.go +++ b/infra/conf/api.go @@ -3,11 +3,11 @@ package conf import ( "strings" - "v2ray.com/core/app/commander" - loggerservice "v2ray.com/core/app/log/command" - handlerservice "v2ray.com/core/app/proxyman/command" - statsservice "v2ray.com/core/app/stats/command" - "v2ray.com/core/common/serial" + "v2ray.com/core/v4/app/commander" + loggerservice "v2ray.com/core/v4/app/log/command" + handlerservice "v2ray.com/core/v4/app/proxyman/command" + statsservice "v2ray.com/core/v4/app/stats/command" + "v2ray.com/core/v4/common/serial" ) type ApiConfig struct { diff --git a/infra/conf/blackhole.go b/infra/conf/blackhole.go index bd0ebf02c..07449d061 100644 --- a/infra/conf/blackhole.go +++ b/infra/conf/blackhole.go @@ -5,8 +5,8 @@ import ( "github.com/golang/protobuf/proto" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/blackhole" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/proxy/blackhole" ) type NoneResponse struct{} diff --git a/infra/conf/blackhole_test.go b/infra/conf/blackhole_test.go index cac4dd325..1efc93c0c 100644 --- a/infra/conf/blackhole_test.go +++ b/infra/conf/blackhole_test.go @@ -3,9 +3,9 @@ package conf_test import ( "testing" - "v2ray.com/core/common/serial" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/proxy/blackhole" + "v2ray.com/core/v4/common/serial" + . "v2ray.com/core/v4/infra/conf" + "v2ray.com/core/v4/proxy/blackhole" ) func TestHTTPResponseJSON(t *testing.T) { diff --git a/infra/conf/command/command.go b/infra/conf/command/command.go index 9f8c12d56..d13503044 100644 --- a/infra/conf/command/command.go +++ b/infra/conf/command/command.go @@ -6,9 +6,9 @@ import ( "os" "github.com/golang/protobuf/proto" - "v2ray.com/core/common" - "v2ray.com/core/infra/conf/serial" - "v2ray.com/core/infra/control" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/infra/conf/serial" + "v2ray.com/core/v4/infra/control" ) type ConfigCommand struct{} diff --git a/infra/conf/command/errors.generated.go b/infra/conf/command/errors.generated.go index 66f780510..ce99c2a5d 100644 --- a/infra/conf/command/errors.generated.go +++ b/infra/conf/command/errors.generated.go @@ -1,6 +1,6 @@ package command -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/infra/conf/common.go b/infra/conf/common.go index b97a200ac..5b24f3569 100644 --- a/infra/conf/common.go +++ b/infra/conf/common.go @@ -5,8 +5,8 @@ import ( "os" "strings" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" ) type StringList []string diff --git a/infra/conf/common_test.go b/infra/conf/common_test.go index 1a4193e88..033c1573e 100644 --- a/infra/conf/common_test.go +++ b/infra/conf/common_test.go @@ -6,11 +6,11 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "v2ray.com/core/common/protocol" + "v2ray.com/core/v4/common/protocol" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - . "v2ray.com/core/infra/conf" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + . "v2ray.com/core/v4/infra/conf" ) func TestStringListUnmarshalError(t *testing.T) { diff --git a/infra/conf/dns.go b/infra/conf/dns.go index c852a6793..90c31b02e 100644 --- a/infra/conf/dns.go +++ b/infra/conf/dns.go @@ -5,9 +5,9 @@ import ( "sort" "strings" - "v2ray.com/core/app/dns" - "v2ray.com/core/app/router" - "v2ray.com/core/common/net" + "v2ray.com/core/v4/app/dns" + "v2ray.com/core/v4/app/router" + "v2ray.com/core/v4/common/net" ) type NameServerConfig struct { diff --git a/infra/conf/dns_proxy.go b/infra/conf/dns_proxy.go index 4617ead5e..9e68dbf9c 100644 --- a/infra/conf/dns_proxy.go +++ b/infra/conf/dns_proxy.go @@ -2,8 +2,8 @@ package conf import ( "github.com/golang/protobuf/proto" - "v2ray.com/core/common/net" - "v2ray.com/core/proxy/dns" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/proxy/dns" ) type DnsOutboundConfig struct { diff --git a/infra/conf/dns_proxy_test.go b/infra/conf/dns_proxy_test.go index 1ecc22626..337d7a86d 100644 --- a/infra/conf/dns_proxy_test.go +++ b/infra/conf/dns_proxy_test.go @@ -3,9 +3,9 @@ package conf_test import ( "testing" - "v2ray.com/core/common/net" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/proxy/dns" + "v2ray.com/core/v4/common/net" + . "v2ray.com/core/v4/infra/conf" + "v2ray.com/core/v4/proxy/dns" ) func TestDnsProxyConfig(t *testing.T) { diff --git a/infra/conf/dns_test.go b/infra/conf/dns_test.go index fc3a4ba13..26bdbf6ac 100644 --- a/infra/conf/dns_test.go +++ b/infra/conf/dns_test.go @@ -7,13 +7,13 @@ import ( "testing" "github.com/golang/protobuf/proto" - "v2ray.com/core/app/dns" - "v2ray.com/core/app/router" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/platform" - "v2ray.com/core/common/platform/filesystem" - . "v2ray.com/core/infra/conf" + "v2ray.com/core/v4/app/dns" + "v2ray.com/core/v4/app/router" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/platform" + "v2ray.com/core/v4/common/platform/filesystem" + . "v2ray.com/core/v4/infra/conf" ) func init() { diff --git a/infra/conf/dokodemo.go b/infra/conf/dokodemo.go index c3b09b45f..4d0ddb8ca 100644 --- a/infra/conf/dokodemo.go +++ b/infra/conf/dokodemo.go @@ -2,7 +2,7 @@ package conf import ( "github.com/golang/protobuf/proto" - "v2ray.com/core/proxy/dokodemo" + "v2ray.com/core/v4/proxy/dokodemo" ) type DokodemoConfig struct { diff --git a/infra/conf/dokodemo_test.go b/infra/conf/dokodemo_test.go index bc78fd618..cbc69ed40 100644 --- a/infra/conf/dokodemo_test.go +++ b/infra/conf/dokodemo_test.go @@ -3,9 +3,9 @@ package conf_test import ( "testing" - "v2ray.com/core/common/net" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/proxy/dokodemo" + "v2ray.com/core/v4/common/net" + . "v2ray.com/core/v4/infra/conf" + "v2ray.com/core/v4/proxy/dokodemo" ) func TestDokodemoConfig(t *testing.T) { diff --git a/infra/conf/errors.generated.go b/infra/conf/errors.generated.go index 96798e2de..a4585f2cd 100644 --- a/infra/conf/errors.generated.go +++ b/infra/conf/errors.generated.go @@ -1,6 +1,6 @@ package conf -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/infra/conf/freedom.go b/infra/conf/freedom.go index f1f8b2ba1..69b4c308c 100644 --- a/infra/conf/freedom.go +++ b/infra/conf/freedom.go @@ -5,9 +5,9 @@ import ( "strings" "github.com/golang/protobuf/proto" - v2net "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/proxy/freedom" + v2net "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/proxy/freedom" ) type FreedomConfig struct { diff --git a/infra/conf/freedom_test.go b/infra/conf/freedom_test.go index 9f4f66425..caa399f0b 100644 --- a/infra/conf/freedom_test.go +++ b/infra/conf/freedom_test.go @@ -3,10 +3,10 @@ package conf_test import ( "testing" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/proxy/freedom" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + . "v2ray.com/core/v4/infra/conf" + "v2ray.com/core/v4/proxy/freedom" ) func TestFreedomConfig(t *testing.T) { diff --git a/infra/conf/general_test.go b/infra/conf/general_test.go index 846b80234..849804f0d 100644 --- a/infra/conf/general_test.go +++ b/infra/conf/general_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/golang/protobuf/proto" - "v2ray.com/core/common" - . "v2ray.com/core/infra/conf" + "v2ray.com/core/v4/common" + . "v2ray.com/core/v4/infra/conf" ) func loadJSON(creator func() Buildable) func(string) (proto.Message, error) { diff --git a/infra/conf/http.go b/infra/conf/http.go index d17537244..ed8e8d143 100644 --- a/infra/conf/http.go +++ b/infra/conf/http.go @@ -4,9 +4,9 @@ import ( "encoding/json" "github.com/golang/protobuf/proto" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/http" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/proxy/http" ) type HttpAccount struct { diff --git a/infra/conf/http_test.go b/infra/conf/http_test.go index 87dd4f097..bb5199057 100644 --- a/infra/conf/http_test.go +++ b/infra/conf/http_test.go @@ -3,8 +3,8 @@ package conf_test import ( "testing" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/proxy/http" + . "v2ray.com/core/v4/infra/conf" + "v2ray.com/core/v4/proxy/http" ) func TestHttpServerConfig(t *testing.T) { diff --git a/infra/conf/json/reader.go b/infra/conf/json/reader.go index 6a654e51a..f9f1aca41 100644 --- a/infra/conf/json/reader.go +++ b/infra/conf/json/reader.go @@ -3,7 +3,7 @@ package json import ( "io" - "v2ray.com/core/common/buf" + "v2ray.com/core/v4/common/buf" ) // State is the internal state of parser. diff --git a/infra/conf/json/reader_test.go b/infra/conf/json/reader_test.go index 900abcb20..37a07592d 100644 --- a/infra/conf/json/reader_test.go +++ b/infra/conf/json/reader_test.go @@ -7,8 +7,8 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - . "v2ray.com/core/infra/conf/json" + "v2ray.com/core/v4/common" + . "v2ray.com/core/v4/infra/conf/json" ) func TestReader(t *testing.T) { diff --git a/infra/conf/log.go b/infra/conf/log.go index 016eb2261..9990b9302 100644 --- a/infra/conf/log.go +++ b/infra/conf/log.go @@ -3,8 +3,8 @@ package conf import ( "strings" - "v2ray.com/core/app/log" - clog "v2ray.com/core/common/log" + "v2ray.com/core/v4/app/log" + clog "v2ray.com/core/v4/common/log" ) func DefaultLogConfig() *log.Config { diff --git a/infra/conf/mtproto.go b/infra/conf/mtproto.go index 684e06a59..1ad1f21e0 100644 --- a/infra/conf/mtproto.go +++ b/infra/conf/mtproto.go @@ -6,9 +6,9 @@ import ( "github.com/golang/protobuf/proto" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/mtproto" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/proxy/mtproto" ) type MTProtoAccount struct { diff --git a/infra/conf/mtproto_test.go b/infra/conf/mtproto_test.go index 7c7d49111..44c2e3dec 100644 --- a/infra/conf/mtproto_test.go +++ b/infra/conf/mtproto_test.go @@ -3,10 +3,10 @@ package conf_test import ( "testing" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/proxy/mtproto" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + . "v2ray.com/core/v4/infra/conf" + "v2ray.com/core/v4/proxy/mtproto" ) func TestMTProtoServerConfig(t *testing.T) { diff --git a/infra/conf/policy.go b/infra/conf/policy.go index 46e2a2cef..d58ae6bfe 100644 --- a/infra/conf/policy.go +++ b/infra/conf/policy.go @@ -1,7 +1,7 @@ package conf import ( - "v2ray.com/core/app/policy" + "v2ray.com/core/v4/app/policy" ) type Policy struct { diff --git a/infra/conf/policy_test.go b/infra/conf/policy_test.go index ce6d4daf2..32851eb27 100644 --- a/infra/conf/policy_test.go +++ b/infra/conf/policy_test.go @@ -3,8 +3,8 @@ package conf_test import ( "testing" - "v2ray.com/core/common" - . "v2ray.com/core/infra/conf" + "v2ray.com/core/v4/common" + . "v2ray.com/core/v4/infra/conf" ) func TestBufferSize(t *testing.T) { diff --git a/infra/conf/reverse.go b/infra/conf/reverse.go index d9144255b..afebd9b0f 100644 --- a/infra/conf/reverse.go +++ b/infra/conf/reverse.go @@ -2,7 +2,7 @@ package conf import ( "github.com/golang/protobuf/proto" - "v2ray.com/core/app/reverse" + "v2ray.com/core/v4/app/reverse" ) type BridgeConfig struct { diff --git a/infra/conf/reverse_test.go b/infra/conf/reverse_test.go index c6c9e1da4..8949ec4cf 100644 --- a/infra/conf/reverse_test.go +++ b/infra/conf/reverse_test.go @@ -3,8 +3,8 @@ package conf_test import ( "testing" - "v2ray.com/core/app/reverse" - "v2ray.com/core/infra/conf" + "v2ray.com/core/v4/app/reverse" + "v2ray.com/core/v4/infra/conf" ) func TestReverseConfig(t *testing.T) { diff --git a/infra/conf/router.go b/infra/conf/router.go index b3870e45d..085512249 100644 --- a/infra/conf/router.go +++ b/infra/conf/router.go @@ -5,9 +5,9 @@ import ( "strconv" "strings" - "v2ray.com/core/app/router" - "v2ray.com/core/common/net" - "v2ray.com/core/common/platform/filesystem" + "v2ray.com/core/v4/app/router" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/platform/filesystem" "github.com/golang/protobuf/proto" ) diff --git a/infra/conf/router_test.go b/infra/conf/router_test.go index ac4284dc8..c45bf92f0 100644 --- a/infra/conf/router_test.go +++ b/infra/conf/router_test.go @@ -6,9 +6,9 @@ import ( "github.com/golang/protobuf/proto" - "v2ray.com/core/app/router" - "v2ray.com/core/common/net" - . "v2ray.com/core/infra/conf" + "v2ray.com/core/v4/app/router" + "v2ray.com/core/v4/common/net" + . "v2ray.com/core/v4/infra/conf" ) func TestRouterConfig(t *testing.T) { diff --git a/infra/conf/serial/errors.generated.go b/infra/conf/serial/errors.generated.go index aeb5e222b..d8348c86a 100644 --- a/infra/conf/serial/errors.generated.go +++ b/infra/conf/serial/errors.generated.go @@ -1,6 +1,6 @@ package serial -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/infra/conf/serial/loader.go b/infra/conf/serial/loader.go index 1d084778d..1729b580b 100644 --- a/infra/conf/serial/loader.go +++ b/infra/conf/serial/loader.go @@ -5,10 +5,10 @@ import ( "encoding/json" "io" - "v2ray.com/core" - "v2ray.com/core/common/errors" - "v2ray.com/core/infra/conf" - json_reader "v2ray.com/core/infra/conf/json" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common/errors" + "v2ray.com/core/v4/infra/conf" + json_reader "v2ray.com/core/v4/infra/conf/json" ) type offset struct { diff --git a/infra/conf/serial/loader_test.go b/infra/conf/serial/loader_test.go index 2bdda7bde..fa706aad2 100644 --- a/infra/conf/serial/loader_test.go +++ b/infra/conf/serial/loader_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - "v2ray.com/core/infra/conf/serial" + "v2ray.com/core/v4/infra/conf/serial" ) func TestLoaderError(t *testing.T) { diff --git a/infra/conf/shadowsocks.go b/infra/conf/shadowsocks.go index 8f61ccf84..aea0b8a78 100644 --- a/infra/conf/shadowsocks.go +++ b/infra/conf/shadowsocks.go @@ -5,9 +5,9 @@ import ( "github.com/golang/protobuf/proto" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/shadowsocks" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/proxy/shadowsocks" ) func cipherFromString(c string) shadowsocks.CipherType { diff --git a/infra/conf/shadowsocks_test.go b/infra/conf/shadowsocks_test.go index 608ee70f9..c50573155 100644 --- a/infra/conf/shadowsocks_test.go +++ b/infra/conf/shadowsocks_test.go @@ -3,11 +3,11 @@ package conf_test import ( "testing" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/proxy/shadowsocks" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + . "v2ray.com/core/v4/infra/conf" + "v2ray.com/core/v4/proxy/shadowsocks" ) func TestShadowsocksServerConfigParsing(t *testing.T) { diff --git a/infra/conf/socks.go b/infra/conf/socks.go index cba5989a6..2e081c204 100644 --- a/infra/conf/socks.go +++ b/infra/conf/socks.go @@ -4,9 +4,9 @@ import ( "encoding/json" "github.com/golang/protobuf/proto" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/socks" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/proxy/socks" ) type SocksAccount struct { diff --git a/infra/conf/socks_test.go b/infra/conf/socks_test.go index 3889a171d..a32003185 100644 --- a/infra/conf/socks_test.go +++ b/infra/conf/socks_test.go @@ -3,11 +3,11 @@ package conf_test import ( "testing" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/proxy/socks" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + . "v2ray.com/core/v4/infra/conf" + "v2ray.com/core/v4/proxy/socks" ) func TestSocksInboundConfig(t *testing.T) { diff --git a/infra/conf/transport.go b/infra/conf/transport.go index d9d09bd35..1eb2d662a 100644 --- a/infra/conf/transport.go +++ b/infra/conf/transport.go @@ -1,9 +1,9 @@ package conf import ( - "v2ray.com/core/common/serial" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/transport" + "v2ray.com/core/v4/transport/internet" ) type TransportConfig struct { diff --git a/infra/conf/transport_authenticators.go b/infra/conf/transport_authenticators.go index 29092d3a4..df6226309 100644 --- a/infra/conf/transport_authenticators.go +++ b/infra/conf/transport_authenticators.go @@ -5,13 +5,13 @@ import ( "github.com/golang/protobuf/proto" - "v2ray.com/core/transport/internet/headers/http" - "v2ray.com/core/transport/internet/headers/noop" - "v2ray.com/core/transport/internet/headers/srtp" - "v2ray.com/core/transport/internet/headers/tls" - "v2ray.com/core/transport/internet/headers/utp" - "v2ray.com/core/transport/internet/headers/wechat" - "v2ray.com/core/transport/internet/headers/wireguard" + "v2ray.com/core/v4/transport/internet/headers/http" + "v2ray.com/core/v4/transport/internet/headers/noop" + "v2ray.com/core/v4/transport/internet/headers/srtp" + "v2ray.com/core/v4/transport/internet/headers/tls" + "v2ray.com/core/v4/transport/internet/headers/utp" + "v2ray.com/core/v4/transport/internet/headers/wechat" + "v2ray.com/core/v4/transport/internet/headers/wireguard" ) type NoOpAuthenticator struct{} diff --git a/infra/conf/transport_internet.go b/infra/conf/transport_internet.go index 9000e24cb..4691da3e0 100644 --- a/infra/conf/transport_internet.go +++ b/infra/conf/transport_internet.go @@ -5,17 +5,17 @@ import ( "strings" "github.com/golang/protobuf/proto" - "v2ray.com/core/common/platform/filesystem" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/domainsocket" - "v2ray.com/core/transport/internet/http" - "v2ray.com/core/transport/internet/kcp" - "v2ray.com/core/transport/internet/quic" - "v2ray.com/core/transport/internet/tcp" - "v2ray.com/core/transport/internet/tls" - "v2ray.com/core/transport/internet/websocket" + "v2ray.com/core/v4/common/platform/filesystem" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/internet/domainsocket" + "v2ray.com/core/v4/transport/internet/http" + "v2ray.com/core/v4/transport/internet/kcp" + "v2ray.com/core/v4/transport/internet/quic" + "v2ray.com/core/v4/transport/internet/tcp" + "v2ray.com/core/v4/transport/internet/tls" + "v2ray.com/core/v4/transport/internet/websocket" ) var ( diff --git a/infra/conf/transport_test.go b/infra/conf/transport_test.go index d547482f8..d249f1569 100644 --- a/infra/conf/transport_test.go +++ b/infra/conf/transport_test.go @@ -5,18 +5,18 @@ import ( "testing" "github.com/golang/protobuf/proto" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/headers/http" - "v2ray.com/core/transport/internet/headers/noop" - "v2ray.com/core/transport/internet/headers/tls" - "v2ray.com/core/transport/internet/kcp" - "v2ray.com/core/transport/internet/quic" - "v2ray.com/core/transport/internet/tcp" - "v2ray.com/core/transport/internet/websocket" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + . "v2ray.com/core/v4/infra/conf" + "v2ray.com/core/v4/transport" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/internet/headers/http" + "v2ray.com/core/v4/transport/internet/headers/noop" + "v2ray.com/core/v4/transport/internet/headers/tls" + "v2ray.com/core/v4/transport/internet/kcp" + "v2ray.com/core/v4/transport/internet/quic" + "v2ray.com/core/v4/transport/internet/tcp" + "v2ray.com/core/v4/transport/internet/websocket" ) func TestSocketConfig(t *testing.T) { diff --git a/infra/conf/v2ray.go b/infra/conf/v2ray.go index 3d3c0d112..d579fd1cd 100644 --- a/infra/conf/v2ray.go +++ b/infra/conf/v2ray.go @@ -4,11 +4,11 @@ import ( "encoding/json" "strings" - "v2ray.com/core" - "v2ray.com/core/app/dispatcher" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/app/stats" - "v2ray.com/core/common/serial" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/dispatcher" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/app/stats" + "v2ray.com/core/v4/common/serial" ) var ( diff --git a/infra/conf/v2ray_test.go b/infra/conf/v2ray_test.go index 85bc3bf42..24d526ad5 100644 --- a/infra/conf/v2ray_test.go +++ b/infra/conf/v2ray_test.go @@ -6,25 +6,25 @@ import ( "github.com/golang/protobuf/proto" - "v2ray.com/core" - "v2ray.com/core/app/dispatcher" - "v2ray.com/core/app/log" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/app/router" - clog "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/proxy/blackhole" - dns_proxy "v2ray.com/core/proxy/dns" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/http" - "v2ray.com/core/transport/internet/tls" - "v2ray.com/core/transport/internet/websocket" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/dispatcher" + "v2ray.com/core/v4/app/log" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/app/router" + clog "v2ray.com/core/v4/common/log" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + . "v2ray.com/core/v4/infra/conf" + "v2ray.com/core/v4/proxy/blackhole" + dns_proxy "v2ray.com/core/v4/proxy/dns" + "v2ray.com/core/v4/proxy/freedom" + "v2ray.com/core/v4/proxy/vmess" + "v2ray.com/core/v4/proxy/vmess/inbound" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/internet/http" + "v2ray.com/core/v4/transport/internet/tls" + "v2ray.com/core/v4/transport/internet/websocket" ) func TestV2RayConfig(t *testing.T) { diff --git a/infra/conf/vmess.go b/infra/conf/vmess.go index d243305aa..13e06d51f 100644 --- a/infra/conf/vmess.go +++ b/infra/conf/vmess.go @@ -6,11 +6,11 @@ import ( "github.com/golang/protobuf/proto" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/proxy/vmess/outbound" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/proxy/vmess" + "v2ray.com/core/v4/proxy/vmess/inbound" + "v2ray.com/core/v4/proxy/vmess/outbound" ) type VMessAccount struct { diff --git a/infra/conf/vmess_test.go b/infra/conf/vmess_test.go index ad3a2e1fa..1f0917f9b 100644 --- a/infra/conf/vmess_test.go +++ b/infra/conf/vmess_test.go @@ -3,13 +3,13 @@ package conf_test import ( "testing" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/proxy/vmess/outbound" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + . "v2ray.com/core/v4/infra/conf" + "v2ray.com/core/v4/proxy/vmess" + "v2ray.com/core/v4/proxy/vmess/inbound" + "v2ray.com/core/v4/proxy/vmess/outbound" ) func TestVMessOutbound(t *testing.T) { diff --git a/infra/control/api.go b/infra/control/api.go index 823d49450..7d403dd03 100644 --- a/infra/control/api.go +++ b/infra/control/api.go @@ -11,9 +11,9 @@ import ( "github.com/golang/protobuf/proto" "google.golang.org/grpc" - logService "v2ray.com/core/app/log/command" - statsService "v2ray.com/core/app/stats/command" - "v2ray.com/core/common" + logService "v2ray.com/core/v4/app/log/command" + statsService "v2ray.com/core/v4/app/stats/command" + "v2ray.com/core/v4/common" ) type ApiCommand struct{} diff --git a/infra/control/cert.go b/infra/control/cert.go index 1112c73ea..4294cc8c8 100644 --- a/infra/control/cert.go +++ b/infra/control/cert.go @@ -9,9 +9,9 @@ import ( "strings" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/protocol/tls/cert" - "v2ray.com/core/common/task" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/protocol/tls/cert" + "v2ray.com/core/v4/common/task" ) type stringList []string diff --git a/infra/control/errors.generated.go b/infra/control/errors.generated.go index 143c6a0df..19c1b1380 100644 --- a/infra/control/errors.generated.go +++ b/infra/control/errors.generated.go @@ -1,6 +1,6 @@ package control -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/infra/control/fetch.go b/infra/control/fetch.go index 167c7483c..26fe3a757 100644 --- a/infra/control/fetch.go +++ b/infra/control/fetch.go @@ -6,8 +6,8 @@ import ( "os" "strings" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" ) type FetchCommand struct{} diff --git a/infra/control/love.go b/infra/control/love.go index a911ed422..72f8e4472 100644 --- a/infra/control/love.go +++ b/infra/control/love.go @@ -7,8 +7,8 @@ import ( "encoding/base64" "fmt" - "v2ray.com/core/common" - "v2ray.com/core/common/platform" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/platform" ) const content = "H4sIAAAAAAAC/4SVMaskNwzH+/kUW6izcSthMGrcqLhVk0rdQS5cSMg7Xu4S0vizB8meZd57M3ta2GHX/ukvyZZmY2ZKDMzCzJyY5yOlxKII1omsf+qkBiiC6WhbYsbkjDAfySQsJqD3jtrD0EBM3sBHzG3kUsrglIQREXonpd47kYIi4AHmgI9Wcq2jlJITC6JZJ+v3ECYzBMAHyYm392yuY4zWsjACmHZSh6l3A0JETzGlWZqDsnArpTg62mhJONhOdO90p97V1BAnteoaOcuummtrrtuERQwUiJwP8a4KGKcyxdOCw1spOY+WHueFqmakAIgUSSuhwKNgobxKXSLbtg6r5cFmBiAeF6yCkYycmv+BiCIiW8ScHa3DgxAuZQbRhFNrLTFo96RBmx9jKWWG5nBsjyJzuIkftUblonppZU5t5LzwIks5L1a4lijagQxLokbIYwxfytNDC+XQqrWW9fzAunhqh5/Tg8PuaMw0d/Tcw3iDO81bHfWM/AnutMh2xqSUntMzd3wHDy9iHMQz8bmUZYvqedTJ5GgOnrNt7FIbSlwXE3wDI19n/KA38MsLaP4l89b5F8AV3ESOMIEhIBgezHBc0H6xV9KbaXwMvPcNvIHcC0C7UPZQx4JVTb35/AneSQq+bAYXsBmY7TCRupF2NTdVm/+ch22xa0pvRERKqt1oxj9DUbXzU84Gvj5hc5a81SlAUwMwgEs4T9+7sg9lb9h+908MWiKV8xtWciVTmnB3tivRjNerfXdxpfEBbq2NUvLMM5R9NLuyQg8nXT0PIh1xPd/wrcV49oJ6zbZaPlj2V87IY9T3F2XCOcW2MbZyZd49H+9m81E1N9SxlU+ff/1y+/f3719vf7788+Ugv/ffbMIH7ZNj0dsT4WMHHwLPu/Rp2O75uh99AK+N2xn7ZHq1OK6gczkN+9ngdOl1Qvki5xwSR8vFX6D+9vXA97B/+fr5rz9u/738uP328urP19vfP759e3n9Xs6jamvqlfJ/AAAA//+YAMZjDgkAAA==" diff --git a/infra/control/main/main.go b/infra/control/main/main.go index 5c41aeb0e..c8e571056 100644 --- a/infra/control/main/main.go +++ b/infra/control/main/main.go @@ -5,8 +5,8 @@ import ( "fmt" "os" - _ "v2ray.com/core/infra/conf/command" - "v2ray.com/core/infra/control" + _ "v2ray.com/core/v4/infra/conf/command" + "v2ray.com/core/v4/infra/control" ) func getCommandName() string { diff --git a/infra/control/tlsping.go b/infra/control/tlsping.go index 2bd20b0d8..2d5b54432 100644 --- a/infra/control/tlsping.go +++ b/infra/control/tlsping.go @@ -7,7 +7,7 @@ import ( "fmt" "net" - "v2ray.com/core/common" + "v2ray.com/core/v4/common" ) type TlsPingCommand struct{} diff --git a/infra/control/uuid.go b/infra/control/uuid.go index d3ab47f38..1fb09d3f9 100644 --- a/infra/control/uuid.go +++ b/infra/control/uuid.go @@ -3,8 +3,8 @@ package control import ( "fmt" - "v2ray.com/core/common" - "v2ray.com/core/common/uuid" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/uuid" ) type UUIDCommand struct{} diff --git a/infra/control/verify.go b/infra/control/verify.go index 3aeab578f..1f4b2b0d8 100644 --- a/infra/control/verify.go +++ b/infra/control/verify.go @@ -8,7 +8,7 @@ import ( "golang.org/x/crypto/openpgp" - "v2ray.com/core/common" + "v2ray.com/core/v4/common" ) var pubkey = []string{`-----BEGIN PGP PUBLIC KEY BLOCK----- diff --git a/infra/vprotogen/main.go b/infra/vprotogen/main.go index 403b61e91..7ad9c3e9f 100644 --- a/infra/vprotogen/main.go +++ b/infra/vprotogen/main.go @@ -11,7 +11,7 @@ import ( "runtime" "strings" - "v2ray.com/core/common" + "v2ray.com/core/v4/common" ) var protocMap = map[string]string{ diff --git a/main/confloader/external/errors.generated.go b/main/confloader/external/errors.generated.go index 919f10d00..266fda29c 100644 --- a/main/confloader/external/errors.generated.go +++ b/main/confloader/external/errors.generated.go @@ -1,6 +1,6 @@ package external -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/main/confloader/external/external.go b/main/confloader/external/external.go index 75dcdea37..323c97b66 100644 --- a/main/confloader/external/external.go +++ b/main/confloader/external/external.go @@ -5,9 +5,9 @@ import ( "os" "strings" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/platform/ctlcmd" - "v2ray.com/core/main/confloader" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/platform/ctlcmd" + "v2ray.com/core/v4/main/confloader" ) //go:generate errorgen diff --git a/main/distro/all/all.go b/main/distro/all/all.go index 71144c087..a7b6c40d7 100644 --- a/main/distro/all/all.go +++ b/main/distro/all/all.go @@ -4,61 +4,61 @@ import ( // The following are necessary as they register handlers in their init functions. // Required features. Can't remove unless there is replacements. - _ "v2ray.com/core/app/dispatcher" - _ "v2ray.com/core/app/proxyman/inbound" - _ "v2ray.com/core/app/proxyman/outbound" + _ "v2ray.com/core/v4/app/dispatcher" + _ "v2ray.com/core/v4/app/proxyman/inbound" + _ "v2ray.com/core/v4/app/proxyman/outbound" // Default commander and all its services. This is an optional feature. - _ "v2ray.com/core/app/commander" - _ "v2ray.com/core/app/log/command" - _ "v2ray.com/core/app/proxyman/command" - _ "v2ray.com/core/app/stats/command" + _ "v2ray.com/core/v4/app/commander" + _ "v2ray.com/core/v4/app/log/command" + _ "v2ray.com/core/v4/app/proxyman/command" + _ "v2ray.com/core/v4/app/stats/command" // Other optional features. - _ "v2ray.com/core/app/dns" - _ "v2ray.com/core/app/log" - _ "v2ray.com/core/app/policy" - _ "v2ray.com/core/app/reverse" - _ "v2ray.com/core/app/router" - _ "v2ray.com/core/app/stats" + _ "v2ray.com/core/v4/app/dns" + _ "v2ray.com/core/v4/app/log" + _ "v2ray.com/core/v4/app/policy" + _ "v2ray.com/core/v4/app/reverse" + _ "v2ray.com/core/v4/app/router" + _ "v2ray.com/core/v4/app/stats" // Inbound and outbound proxies. - _ "v2ray.com/core/proxy/blackhole" - _ "v2ray.com/core/proxy/dns" - _ "v2ray.com/core/proxy/dokodemo" - _ "v2ray.com/core/proxy/freedom" - _ "v2ray.com/core/proxy/http" - _ "v2ray.com/core/proxy/mtproto" - _ "v2ray.com/core/proxy/shadowsocks" - _ "v2ray.com/core/proxy/socks" - _ "v2ray.com/core/proxy/vmess/inbound" - _ "v2ray.com/core/proxy/vmess/outbound" + _ "v2ray.com/core/v4/proxy/blackhole" + _ "v2ray.com/core/v4/proxy/dns" + _ "v2ray.com/core/v4/proxy/dokodemo" + _ "v2ray.com/core/v4/proxy/freedom" + _ "v2ray.com/core/v4/proxy/http" + _ "v2ray.com/core/v4/proxy/mtproto" + _ "v2ray.com/core/v4/proxy/shadowsocks" + _ "v2ray.com/core/v4/proxy/socks" + _ "v2ray.com/core/v4/proxy/vmess/inbound" + _ "v2ray.com/core/v4/proxy/vmess/outbound" // Transports - _ "v2ray.com/core/transport/internet/domainsocket" - _ "v2ray.com/core/transport/internet/http" - _ "v2ray.com/core/transport/internet/kcp" - _ "v2ray.com/core/transport/internet/quic" - _ "v2ray.com/core/transport/internet/tcp" - _ "v2ray.com/core/transport/internet/tls" - _ "v2ray.com/core/transport/internet/udp" - _ "v2ray.com/core/transport/internet/websocket" + _ "v2ray.com/core/v4/transport/internet/domainsocket" + _ "v2ray.com/core/v4/transport/internet/http" + _ "v2ray.com/core/v4/transport/internet/kcp" + _ "v2ray.com/core/v4/transport/internet/quic" + _ "v2ray.com/core/v4/transport/internet/tcp" + _ "v2ray.com/core/v4/transport/internet/tls" + _ "v2ray.com/core/v4/transport/internet/udp" + _ "v2ray.com/core/v4/transport/internet/websocket" // Transport headers - _ "v2ray.com/core/transport/internet/headers/http" - _ "v2ray.com/core/transport/internet/headers/noop" - _ "v2ray.com/core/transport/internet/headers/srtp" - _ "v2ray.com/core/transport/internet/headers/tls" - _ "v2ray.com/core/transport/internet/headers/utp" - _ "v2ray.com/core/transport/internet/headers/wechat" - _ "v2ray.com/core/transport/internet/headers/wireguard" + _ "v2ray.com/core/v4/transport/internet/headers/http" + _ "v2ray.com/core/v4/transport/internet/headers/noop" + _ "v2ray.com/core/v4/transport/internet/headers/srtp" + _ "v2ray.com/core/v4/transport/internet/headers/tls" + _ "v2ray.com/core/v4/transport/internet/headers/utp" + _ "v2ray.com/core/v4/transport/internet/headers/wechat" + _ "v2ray.com/core/v4/transport/internet/headers/wireguard" // JSON config support. Choose only one from the two below. // The following line loads JSON from v2ctl - _ "v2ray.com/core/main/json" + _ "v2ray.com/core/v4/main/json" // The following line loads JSON internally // _ "v2ray.com/core/main/jsonem" // Load config from file or http(s) - _ "v2ray.com/core/main/confloader/external" + _ "v2ray.com/core/v4/main/confloader/external" ) diff --git a/main/errors.generated.go b/main/errors.generated.go index ed27b93a2..ef0b49ec6 100644 --- a/main/errors.generated.go +++ b/main/errors.generated.go @@ -1,6 +1,6 @@ package main -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/main/json/config_json.go b/main/json/config_json.go index 45c6374d9..43f422fcd 100644 --- a/main/json/config_json.go +++ b/main/json/config_json.go @@ -5,10 +5,10 @@ package json import ( "io" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/platform/ctlcmd" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/platform/ctlcmd" ) func init() { diff --git a/main/json/errors.generated.go b/main/json/errors.generated.go index 654bc88ec..26048ec12 100644 --- a/main/json/errors.generated.go +++ b/main/json/errors.generated.go @@ -1,6 +1,6 @@ package json -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/main/jsonem/jsonem.go b/main/jsonem/jsonem.go index 7b58bb9b5..6ae352971 100644 --- a/main/jsonem/jsonem.go +++ b/main/jsonem/jsonem.go @@ -1,9 +1,9 @@ package jsonem import ( - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/infra/conf/serial" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/infra/conf/serial" ) func init() { diff --git a/main/main.go b/main/main.go index a5d3a447d..11f69b2dd 100644 --- a/main/main.go +++ b/main/main.go @@ -12,10 +12,10 @@ import ( "strings" "syscall" - "v2ray.com/core" - "v2ray.com/core/common/platform" - "v2ray.com/core/main/confloader" - _ "v2ray.com/core/main/distro/all" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common/platform" + "v2ray.com/core/v4/main/confloader" + _ "v2ray.com/core/v4/main/distro/all" ) var ( diff --git a/proxy/blackhole/blackhole.go b/proxy/blackhole/blackhole.go index 8bcc5f5ec..43593365f 100644 --- a/proxy/blackhole/blackhole.go +++ b/proxy/blackhole/blackhole.go @@ -10,9 +10,9 @@ import ( "context" "time" - "v2ray.com/core/common" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/transport" + "v2ray.com/core/v4/transport/internet" ) // Handler is an outbound connection that silently swallow the entire payload. diff --git a/proxy/blackhole/blackhole_test.go b/proxy/blackhole/blackhole_test.go index 860de9ee2..c4dd07b33 100644 --- a/proxy/blackhole/blackhole_test.go +++ b/proxy/blackhole/blackhole_test.go @@ -4,12 +4,12 @@ import ( "context" "testing" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/blackhole" - "v2ray.com/core/transport" - "v2ray.com/core/transport/pipe" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/proxy/blackhole" + "v2ray.com/core/v4/transport" + "v2ray.com/core/v4/transport/pipe" ) func TestBlackholeHTTPResponse(t *testing.T) { diff --git a/proxy/blackhole/config.go b/proxy/blackhole/config.go index 6c1e864fa..cc2e01186 100644 --- a/proxy/blackhole/config.go +++ b/proxy/blackhole/config.go @@ -1,8 +1,8 @@ package blackhole import ( - "v2ray.com/core/common" - "v2ray.com/core/common/buf" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" ) const ( diff --git a/proxy/blackhole/config.pb.go b/proxy/blackhole/config.pb.go index 6d9a82b19..8322e8bc1 100644 --- a/proxy/blackhole/config.pb.go +++ b/proxy/blackhole/config.pb.go @@ -4,7 +4,7 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - serial "v2ray.com/core/common/serial" + serial "v2ray.com/core/v4/common/serial" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proxy/blackhole/config_test.go b/proxy/blackhole/config_test.go index 340ddcc27..517cc1b7c 100644 --- a/proxy/blackhole/config_test.go +++ b/proxy/blackhole/config_test.go @@ -5,9 +5,9 @@ import ( "net/http" "testing" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - . "v2ray.com/core/proxy/blackhole" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + . "v2ray.com/core/v4/proxy/blackhole" ) func TestHTTPResponse(t *testing.T) { diff --git a/proxy/blackhole/errors.generated.go b/proxy/blackhole/errors.generated.go index e985de40f..23c6fcaab 100644 --- a/proxy/blackhole/errors.generated.go +++ b/proxy/blackhole/errors.generated.go @@ -1,6 +1,6 @@ package blackhole -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/dns/config.pb.go b/proxy/dns/config.pb.go index 0ca26cc56..96b00970d 100644 --- a/proxy/dns/config.pb.go +++ b/proxy/dns/config.pb.go @@ -4,7 +4,7 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - net "v2ray.com/core/common/net" + net "v2ray.com/core/v4/common/net" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proxy/dns/dns.go b/proxy/dns/dns.go index 4117c0c36..537104a62 100644 --- a/proxy/dns/dns.go +++ b/proxy/dns/dns.go @@ -9,16 +9,16 @@ import ( "golang.org/x/net/dns/dnsmessage" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - dns_proto "v2ray.com/core/common/protocol/dns" - "v2ray.com/core/common/session" - "v2ray.com/core/common/task" - "v2ray.com/core/features/dns" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + dns_proto "v2ray.com/core/v4/common/protocol/dns" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/common/task" + "v2ray.com/core/v4/features/dns" + "v2ray.com/core/v4/transport" + "v2ray.com/core/v4/transport/internet" ) func init() { diff --git a/proxy/dns/dns_test.go b/proxy/dns/dns_test.go index da9175968..d97ed9034 100644 --- a/proxy/dns/dns_test.go +++ b/proxy/dns/dns_test.go @@ -8,20 +8,20 @@ import ( "github.com/google/go-cmp/cmp" "github.com/miekg/dns" - "v2ray.com/core" - "v2ray.com/core/app/dispatcher" - dnsapp "v2ray.com/core/app/dns" - "v2ray.com/core/app/policy" - "v2ray.com/core/app/proxyman" - _ "v2ray.com/core/app/proxyman/inbound" - _ "v2ray.com/core/app/proxyman/outbound" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/serial" - dns_proxy "v2ray.com/core/proxy/dns" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/testing/servers/udp" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/dispatcher" + dnsapp "v2ray.com/core/v4/app/dns" + "v2ray.com/core/v4/app/policy" + "v2ray.com/core/v4/app/proxyman" + _ "v2ray.com/core/v4/app/proxyman/inbound" + _ "v2ray.com/core/v4/app/proxyman/outbound" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/serial" + dns_proxy "v2ray.com/core/v4/proxy/dns" + "v2ray.com/core/v4/proxy/dokodemo" + "v2ray.com/core/v4/testing/servers/tcp" + "v2ray.com/core/v4/testing/servers/udp" ) type staticHandler struct { diff --git a/proxy/dns/errors.generated.go b/proxy/dns/errors.generated.go index ba70372f0..8058c1330 100644 --- a/proxy/dns/errors.generated.go +++ b/proxy/dns/errors.generated.go @@ -1,6 +1,6 @@ package dns -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/dokodemo/config.go b/proxy/dokodemo/config.go index 84278afe4..c8e1dd897 100644 --- a/proxy/dokodemo/config.go +++ b/proxy/dokodemo/config.go @@ -1,7 +1,7 @@ package dokodemo import ( - "v2ray.com/core/common/net" + "v2ray.com/core/v4/common/net" ) // GetPredefinedAddress returns the defined address from proto config. Null if address is not valid. diff --git a/proxy/dokodemo/config.pb.go b/proxy/dokodemo/config.pb.go index f4fd588e0..8b9734cbb 100644 --- a/proxy/dokodemo/config.pb.go +++ b/proxy/dokodemo/config.pb.go @@ -4,7 +4,7 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - net "v2ray.com/core/common/net" + net "v2ray.com/core/v4/common/net" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proxy/dokodemo/dokodemo.go b/proxy/dokodemo/dokodemo.go index 227585051..5bb663ea9 100644 --- a/proxy/dokodemo/dokodemo.go +++ b/proxy/dokodemo/dokodemo.go @@ -9,17 +9,17 @@ import ( "sync/atomic" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/policy" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/common/signal" + "v2ray.com/core/v4/common/task" + "v2ray.com/core/v4/features/policy" + "v2ray.com/core/v4/features/routing" + "v2ray.com/core/v4/transport/internet" ) func init() { diff --git a/proxy/dokodemo/errors.generated.go b/proxy/dokodemo/errors.generated.go index 23562ab49..cb33d72e9 100644 --- a/proxy/dokodemo/errors.generated.go +++ b/proxy/dokodemo/errors.generated.go @@ -1,6 +1,6 @@ package dokodemo -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/freedom/config.pb.go b/proxy/freedom/config.pb.go index 82b0effb0..924b60717 100644 --- a/proxy/freedom/config.pb.go +++ b/proxy/freedom/config.pb.go @@ -4,7 +4,7 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - protocol "v2ray.com/core/common/protocol" + protocol "v2ray.com/core/v4/common/protocol" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proxy/freedom/errors.generated.go b/proxy/freedom/errors.generated.go index b4ca934ce..ea004a9d0 100644 --- a/proxy/freedom/errors.generated.go +++ b/proxy/freedom/errors.generated.go @@ -1,6 +1,6 @@ package freedom -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/freedom/freedom.go b/proxy/freedom/freedom.go index b968a036f..aba3f18d0 100644 --- a/proxy/freedom/freedom.go +++ b/proxy/freedom/freedom.go @@ -8,19 +8,19 @@ import ( "context" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/dice" - "v2ray.com/core/common/net" - "v2ray.com/core/common/retry" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/dns" - "v2ray.com/core/features/policy" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/dice" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/retry" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/common/signal" + "v2ray.com/core/v4/common/task" + "v2ray.com/core/v4/features/dns" + "v2ray.com/core/v4/features/policy" + "v2ray.com/core/v4/transport" + "v2ray.com/core/v4/transport/internet" ) func init() { diff --git a/proxy/http/client.go b/proxy/http/client.go index 51dca746e..2a8701d69 100644 --- a/proxy/http/client.go +++ b/proxy/http/client.go @@ -8,18 +8,18 @@ import ( "io" "strings" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/retry" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/policy" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/retry" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/common/signal" + "v2ray.com/core/v4/common/task" + "v2ray.com/core/v4/features/policy" + "v2ray.com/core/v4/transport" + "v2ray.com/core/v4/transport/internet" ) type Client struct { diff --git a/proxy/http/config.go b/proxy/http/config.go index 7e8da149d..a97d8b9ee 100644 --- a/proxy/http/config.go +++ b/proxy/http/config.go @@ -1,7 +1,7 @@ package http import ( - "v2ray.com/core/common/protocol" + "v2ray.com/core/v4/common/protocol" ) func (a *Account) Equals(another protocol.Account) bool { diff --git a/proxy/http/config.pb.go b/proxy/http/config.pb.go index a7b2507ee..1da5c239d 100644 --- a/proxy/http/config.pb.go +++ b/proxy/http/config.pb.go @@ -4,7 +4,7 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - protocol "v2ray.com/core/common/protocol" + protocol "v2ray.com/core/v4/common/protocol" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proxy/http/errors.generated.go b/proxy/http/errors.generated.go index 9c6e8e4cb..44ee5f404 100644 --- a/proxy/http/errors.generated.go +++ b/proxy/http/errors.generated.go @@ -1,6 +1,6 @@ package http -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/http/server.go b/proxy/http/server.go index 7d7bcb54c..d0c7525f5 100755 --- a/proxy/http/server.go +++ b/proxy/http/server.go @@ -11,20 +11,20 @@ import ( "strings" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - http_proto "v2ray.com/core/common/protocol/http" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/policy" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/errors" + "v2ray.com/core/v4/common/log" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + http_proto "v2ray.com/core/v4/common/protocol/http" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/common/signal" + "v2ray.com/core/v4/common/task" + "v2ray.com/core/v4/features/policy" + "v2ray.com/core/v4/features/routing" + "v2ray.com/core/v4/transport/internet" ) // Server is an HTTP proxy server. diff --git a/proxy/mtproto/auth.go b/proxy/mtproto/auth.go index b0c53998a..ef7dbaf0e 100644 --- a/proxy/mtproto/auth.go +++ b/proxy/mtproto/auth.go @@ -7,7 +7,7 @@ import ( "io" "sync" - "v2ray.com/core/common" + "v2ray.com/core/v4/common" ) const ( diff --git a/proxy/mtproto/auth_test.go b/proxy/mtproto/auth_test.go index b11100824..aca18f554 100644 --- a/proxy/mtproto/auth_test.go +++ b/proxy/mtproto/auth_test.go @@ -7,8 +7,8 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - . "v2ray.com/core/proxy/mtproto" + "v2ray.com/core/v4/common" + . "v2ray.com/core/v4/proxy/mtproto" ) func TestInverse(t *testing.T) { diff --git a/proxy/mtproto/client.go b/proxy/mtproto/client.go index 6db10e048..d60d7d128 100644 --- a/proxy/mtproto/client.go +++ b/proxy/mtproto/client.go @@ -3,14 +3,14 @@ package mtproto import ( "context" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/crypto" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/common/task" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/crypto" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/common/task" + "v2ray.com/core/v4/transport" + "v2ray.com/core/v4/transport/internet" ) type Client struct { diff --git a/proxy/mtproto/config.go b/proxy/mtproto/config.go index 52d214c0f..682fc9200 100644 --- a/proxy/mtproto/config.go +++ b/proxy/mtproto/config.go @@ -1,7 +1,7 @@ package mtproto import ( - "v2ray.com/core/common/protocol" + "v2ray.com/core/v4/common/protocol" ) func (a *Account) Equals(another protocol.Account) bool { diff --git a/proxy/mtproto/config.pb.go b/proxy/mtproto/config.pb.go index 5838dea1d..227dbe5e9 100644 --- a/proxy/mtproto/config.pb.go +++ b/proxy/mtproto/config.pb.go @@ -4,7 +4,7 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - protocol "v2ray.com/core/common/protocol" + protocol "v2ray.com/core/v4/common/protocol" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proxy/mtproto/errors.generated.go b/proxy/mtproto/errors.generated.go index 52352d709..6fe62759c 100644 --- a/proxy/mtproto/errors.generated.go +++ b/proxy/mtproto/errors.generated.go @@ -1,6 +1,6 @@ package mtproto -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/mtproto/server.go b/proxy/mtproto/server.go index 079e453b5..9c3dc25a5 100644 --- a/proxy/mtproto/server.go +++ b/proxy/mtproto/server.go @@ -7,18 +7,18 @@ import ( "context" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/crypto" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/policy" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/crypto" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/common/signal" + "v2ray.com/core/v4/common/task" + "v2ray.com/core/v4/features/policy" + "v2ray.com/core/v4/features/routing" + "v2ray.com/core/v4/transport/internet" ) var ( diff --git a/proxy/proxy.go b/proxy/proxy.go index f4bd6b514..32369f66a 100755 --- a/proxy/proxy.go +++ b/proxy/proxy.go @@ -8,11 +8,11 @@ package proxy import ( "context" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/features/routing" + "v2ray.com/core/v4/transport" + "v2ray.com/core/v4/transport/internet" ) // An Inbound processes inbound connections. diff --git a/proxy/shadowsocks/client.go b/proxy/shadowsocks/client.go index ab5619c5e..1fee6b232 100644 --- a/proxy/shadowsocks/client.go +++ b/proxy/shadowsocks/client.go @@ -5,18 +5,18 @@ package shadowsocks import ( "context" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/retry" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/policy" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/retry" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/common/signal" + "v2ray.com/core/v4/common/task" + "v2ray.com/core/v4/features/policy" + "v2ray.com/core/v4/transport" + "v2ray.com/core/v4/transport/internet" ) // Client is a inbound handler for Shadowsocks protocol diff --git a/proxy/shadowsocks/config.go b/proxy/shadowsocks/config.go index 0bcdcac3b..b5576bbe5 100644 --- a/proxy/shadowsocks/config.go +++ b/proxy/shadowsocks/config.go @@ -11,10 +11,10 @@ import ( "golang.org/x/crypto/chacha20poly1305" "golang.org/x/crypto/hkdf" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/crypto" - "v2ray.com/core/common/protocol" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/crypto" + "v2ray.com/core/v4/common/protocol" ) // MemoryAccount is an account type converted from Account. diff --git a/proxy/shadowsocks/config.pb.go b/proxy/shadowsocks/config.pb.go index 6b46dcbed..540753d33 100644 --- a/proxy/shadowsocks/config.pb.go +++ b/proxy/shadowsocks/config.pb.go @@ -4,8 +4,8 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - net "v2ray.com/core/common/net" - protocol "v2ray.com/core/common/protocol" + net "v2ray.com/core/v4/common/net" + protocol "v2ray.com/core/v4/common/protocol" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proxy/shadowsocks/config_test.go b/proxy/shadowsocks/config_test.go index 57131ad5a..90ced9628 100644 --- a/proxy/shadowsocks/config_test.go +++ b/proxy/shadowsocks/config_test.go @@ -6,9 +6,9 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/proxy/shadowsocks" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/proxy/shadowsocks" ) func TestAEADCipherUDP(t *testing.T) { diff --git a/proxy/shadowsocks/errors.generated.go b/proxy/shadowsocks/errors.generated.go index 42d6d3fe8..bf8ea2c46 100644 --- a/proxy/shadowsocks/errors.generated.go +++ b/proxy/shadowsocks/errors.generated.go @@ -1,6 +1,6 @@ package shadowsocks -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/shadowsocks/ota.go b/proxy/shadowsocks/ota.go index 33daa9fd5..6f64e36e1 100644 --- a/proxy/shadowsocks/ota.go +++ b/proxy/shadowsocks/ota.go @@ -9,10 +9,10 @@ import ( "encoding/binary" "io" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/bytespool" - "v2ray.com/core/common/serial" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/bytespool" + "v2ray.com/core/v4/common/serial" ) const ( diff --git a/proxy/shadowsocks/ota_test.go b/proxy/shadowsocks/ota_test.go index 28ac416fd..1b2760dc6 100644 --- a/proxy/shadowsocks/ota_test.go +++ b/proxy/shadowsocks/ota_test.go @@ -5,9 +5,9 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - . "v2ray.com/core/proxy/shadowsocks" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + . "v2ray.com/core/v4/proxy/shadowsocks" ) func TestNormalChunkReading(t *testing.T) { diff --git a/proxy/shadowsocks/protocol.go b/proxy/shadowsocks/protocol.go index 8c9d69359..e10c85b13 100644 --- a/proxy/shadowsocks/protocol.go +++ b/proxy/shadowsocks/protocol.go @@ -7,11 +7,11 @@ import ( "crypto/rand" "io" - "v2ray.com/core/common" - "v2ray.com/core/common/bitmask" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/bitmask" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" ) const ( diff --git a/proxy/shadowsocks/protocol_test.go b/proxy/shadowsocks/protocol_test.go index e6a28ba6e..46727e652 100644 --- a/proxy/shadowsocks/protocol_test.go +++ b/proxy/shadowsocks/protocol_test.go @@ -5,11 +5,11 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - . "v2ray.com/core/proxy/shadowsocks" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + . "v2ray.com/core/v4/proxy/shadowsocks" ) func toAccount(a *Account) protocol.Account { diff --git a/proxy/shadowsocks/server.go b/proxy/shadowsocks/server.go index ece76e099..7546229d2 100644 --- a/proxy/shadowsocks/server.go +++ b/proxy/shadowsocks/server.go @@ -6,20 +6,20 @@ import ( "context" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - udp_proto "v2ray.com/core/common/protocol/udp" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/policy" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/udp" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/log" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + udp_proto "v2ray.com/core/v4/common/protocol/udp" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/common/signal" + "v2ray.com/core/v4/common/task" + "v2ray.com/core/v4/features/policy" + "v2ray.com/core/v4/features/routing" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/internet/udp" ) type Server struct { diff --git a/proxy/socks/client.go b/proxy/socks/client.go index e303e5b32..54e11f3a4 100644 --- a/proxy/socks/client.go +++ b/proxy/socks/client.go @@ -6,18 +6,18 @@ import ( "context" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/retry" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/policy" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/retry" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/common/signal" + "v2ray.com/core/v4/common/task" + "v2ray.com/core/v4/features/policy" + "v2ray.com/core/v4/transport" + "v2ray.com/core/v4/transport/internet" ) // Client is a Socks5 client. diff --git a/proxy/socks/config.go b/proxy/socks/config.go index f9c617de8..2035467c6 100644 --- a/proxy/socks/config.go +++ b/proxy/socks/config.go @@ -2,7 +2,7 @@ package socks -import "v2ray.com/core/common/protocol" +import "v2ray.com/core/v4/common/protocol" func (a *Account) Equals(another protocol.Account) bool { if account, ok := another.(*Account); ok { diff --git a/proxy/socks/config.pb.go b/proxy/socks/config.pb.go index 37aaf7379..bd98b5f5e 100644 --- a/proxy/socks/config.pb.go +++ b/proxy/socks/config.pb.go @@ -4,8 +4,8 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - net "v2ray.com/core/common/net" - protocol "v2ray.com/core/common/protocol" + net "v2ray.com/core/v4/common/net" + protocol "v2ray.com/core/v4/common/protocol" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proxy/socks/errors.generated.go b/proxy/socks/errors.generated.go index a4886798c..3b4628b67 100644 --- a/proxy/socks/errors.generated.go +++ b/proxy/socks/errors.generated.go @@ -1,6 +1,6 @@ package socks -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/socks/protocol.go b/proxy/socks/protocol.go index ffd04e6e4..92092dbb4 100644 --- a/proxy/socks/protocol.go +++ b/proxy/socks/protocol.go @@ -6,10 +6,10 @@ import ( "encoding/binary" "io" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" ) const ( diff --git a/proxy/socks/protocol_test.go b/proxy/socks/protocol_test.go index 40aca93fb..10ace4d58 100644 --- a/proxy/socks/protocol_test.go +++ b/proxy/socks/protocol_test.go @@ -6,11 +6,11 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - . "v2ray.com/core/proxy/socks" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + . "v2ray.com/core/v4/proxy/socks" ) func TestUDPEncoding(t *testing.T) { diff --git a/proxy/socks/server.go b/proxy/socks/server.go index 1c4cb2b7b..dee22738c 100644 --- a/proxy/socks/server.go +++ b/proxy/socks/server.go @@ -7,21 +7,21 @@ import ( "io" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - udp_proto "v2ray.com/core/common/protocol/udp" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features" - "v2ray.com/core/features/policy" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/udp" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/log" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + udp_proto "v2ray.com/core/v4/common/protocol/udp" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/common/signal" + "v2ray.com/core/v4/common/task" + "v2ray.com/core/v4/features" + "v2ray.com/core/v4/features/policy" + "v2ray.com/core/v4/features/routing" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/internet/udp" ) // Server is a SOCKS 5 proxy server diff --git a/proxy/vmess/account.go b/proxy/vmess/account.go index cdced1539..83ffa6a8b 100644 --- a/proxy/vmess/account.go +++ b/proxy/vmess/account.go @@ -3,9 +3,9 @@ package vmess import ( - "v2ray.com/core/common/dice" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/uuid" + "v2ray.com/core/v4/common/dice" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/uuid" ) // MemoryAccount is an in-memory from of VMess account. diff --git a/proxy/vmess/account.pb.go b/proxy/vmess/account.pb.go index 74df8e684..ffcfc4412 100755 --- a/proxy/vmess/account.pb.go +++ b/proxy/vmess/account.pb.go @@ -4,7 +4,7 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - protocol "v2ray.com/core/common/protocol" + protocol "v2ray.com/core/v4/common/protocol" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proxy/vmess/encoding/auth.go b/proxy/vmess/encoding/auth.go index 9a9231575..cf5e8049c 100644 --- a/proxy/vmess/encoding/auth.go +++ b/proxy/vmess/encoding/auth.go @@ -5,7 +5,7 @@ import ( "encoding/binary" "hash/fnv" - "v2ray.com/core/common" + "v2ray.com/core/v4/common" "golang.org/x/crypto/sha3" ) diff --git a/proxy/vmess/encoding/auth_test.go b/proxy/vmess/encoding/auth_test.go index ed85ebf97..a6398cd31 100644 --- a/proxy/vmess/encoding/auth_test.go +++ b/proxy/vmess/encoding/auth_test.go @@ -6,8 +6,8 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - . "v2ray.com/core/proxy/vmess/encoding" + "v2ray.com/core/v4/common" + . "v2ray.com/core/v4/proxy/vmess/encoding" ) func TestFnvAuth(t *testing.T) { diff --git a/proxy/vmess/encoding/client.go b/proxy/vmess/encoding/client.go index 8773e6089..3fa5c4350 100644 --- a/proxy/vmess/encoding/client.go +++ b/proxy/vmess/encoding/client.go @@ -10,14 +10,14 @@ import ( "golang.org/x/crypto/chacha20poly1305" - "v2ray.com/core/common" - "v2ray.com/core/common/bitmask" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/crypto" - "v2ray.com/core/common/dice" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/vmess" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/bitmask" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/crypto" + "v2ray.com/core/v4/common/dice" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/proxy/vmess" ) func hashTimestamp(h hash.Hash, t protocol.Timestamp) []byte { diff --git a/proxy/vmess/encoding/commands.go b/proxy/vmess/encoding/commands.go index 4b0bc4479..99b449dbe 100644 --- a/proxy/vmess/encoding/commands.go +++ b/proxy/vmess/encoding/commands.go @@ -4,12 +4,12 @@ import ( "encoding/binary" "io" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/common/uuid" ) var ( diff --git a/proxy/vmess/encoding/commands_test.go b/proxy/vmess/encoding/commands_test.go index a28335218..105777bb0 100644 --- a/proxy/vmess/encoding/commands_test.go +++ b/proxy/vmess/encoding/commands_test.go @@ -5,11 +5,11 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/uuid" - . "v2ray.com/core/proxy/vmess/encoding" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/uuid" + . "v2ray.com/core/v4/proxy/vmess/encoding" ) func TestSwitchAccount(t *testing.T) { diff --git a/proxy/vmess/encoding/encoding.go b/proxy/vmess/encoding/encoding.go index f6d049476..345f29e15 100644 --- a/proxy/vmess/encoding/encoding.go +++ b/proxy/vmess/encoding/encoding.go @@ -1,8 +1,8 @@ package encoding import ( - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" ) //go:generate errorgen diff --git a/proxy/vmess/encoding/encoding_test.go b/proxy/vmess/encoding/encoding_test.go index 00fef1ecf..1e70cbed9 100644 --- a/proxy/vmess/encoding/encoding_test.go +++ b/proxy/vmess/encoding/encoding_test.go @@ -5,13 +5,13 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/uuid" - "v2ray.com/core/proxy/vmess" - . "v2ray.com/core/proxy/vmess/encoding" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/uuid" + "v2ray.com/core/v4/proxy/vmess" + . "v2ray.com/core/v4/proxy/vmess/encoding" ) func toAccount(a *vmess.Account) protocol.Account { diff --git a/proxy/vmess/encoding/errors.generated.go b/proxy/vmess/encoding/errors.generated.go index 6fb682106..fcc2e9578 100644 --- a/proxy/vmess/encoding/errors.generated.go +++ b/proxy/vmess/encoding/errors.generated.go @@ -1,6 +1,6 @@ package encoding -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/vmess/encoding/server.go b/proxy/vmess/encoding/server.go index 0840ce416..09a3e661c 100644 --- a/proxy/vmess/encoding/server.go +++ b/proxy/vmess/encoding/server.go @@ -10,14 +10,14 @@ import ( "golang.org/x/crypto/chacha20poly1305" - "v2ray.com/core/common" - "v2ray.com/core/common/bitmask" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/crypto" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/task" - "v2ray.com/core/proxy/vmess" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/bitmask" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/crypto" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/task" + "v2ray.com/core/v4/proxy/vmess" ) type sessionId struct { diff --git a/proxy/vmess/errors.generated.go b/proxy/vmess/errors.generated.go index cc044be3d..0756ef519 100644 --- a/proxy/vmess/errors.generated.go +++ b/proxy/vmess/errors.generated.go @@ -1,6 +1,6 @@ package vmess -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/vmess/inbound/config.pb.go b/proxy/vmess/inbound/config.pb.go index e5e4e6bac..a0e6c9e73 100644 --- a/proxy/vmess/inbound/config.pb.go +++ b/proxy/vmess/inbound/config.pb.go @@ -4,7 +4,7 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - protocol "v2ray.com/core/common/protocol" + protocol "v2ray.com/core/v4/common/protocol" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proxy/vmess/inbound/errors.generated.go b/proxy/vmess/inbound/errors.generated.go index 90d805b1e..f8f57a5de 100644 --- a/proxy/vmess/inbound/errors.generated.go +++ b/proxy/vmess/inbound/errors.generated.go @@ -1,6 +1,6 @@ package inbound -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/vmess/inbound/inbound.go b/proxy/vmess/inbound/inbound.go index 409900b1a..3334cc6e3 100644 --- a/proxy/vmess/inbound/inbound.go +++ b/proxy/vmess/inbound/inbound.go @@ -11,23 +11,23 @@ import ( "sync" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/common/uuid" - feature_inbound "v2ray.com/core/features/inbound" - "v2ray.com/core/features/policy" - "v2ray.com/core/features/routing" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/encoding" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/errors" + "v2ray.com/core/v4/common/log" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/common/signal" + "v2ray.com/core/v4/common/task" + "v2ray.com/core/v4/common/uuid" + feature_inbound "v2ray.com/core/v4/features/inbound" + "v2ray.com/core/v4/features/policy" + "v2ray.com/core/v4/features/routing" + "v2ray.com/core/v4/proxy/vmess" + "v2ray.com/core/v4/proxy/vmess/encoding" + "v2ray.com/core/v4/transport/internet" ) type userByEmail struct { diff --git a/proxy/vmess/outbound/command.go b/proxy/vmess/outbound/command.go index f46983a41..b87dc05d9 100644 --- a/proxy/vmess/outbound/command.go +++ b/proxy/vmess/outbound/command.go @@ -5,10 +5,10 @@ package outbound import ( "time" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/proxy/vmess" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/proxy/vmess" ) func (h *Handler) handleSwitchAccount(cmd *protocol.CommandSwitchAccount) { diff --git a/proxy/vmess/outbound/config.pb.go b/proxy/vmess/outbound/config.pb.go index 15e2d1d09..fde889a88 100644 --- a/proxy/vmess/outbound/config.pb.go +++ b/proxy/vmess/outbound/config.pb.go @@ -4,7 +4,7 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - protocol "v2ray.com/core/common/protocol" + protocol "v2ray.com/core/v4/common/protocol" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proxy/vmess/outbound/errors.generated.go b/proxy/vmess/outbound/errors.generated.go index 37e984d87..9ce9ec1ac 100644 --- a/proxy/vmess/outbound/errors.generated.go +++ b/proxy/vmess/outbound/errors.generated.go @@ -1,6 +1,6 @@ package outbound -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/vmess/outbound/outbound.go b/proxy/vmess/outbound/outbound.go index 91c80b4f8..d69ca82a5 100644 --- a/proxy/vmess/outbound/outbound.go +++ b/proxy/vmess/outbound/outbound.go @@ -8,21 +8,21 @@ import ( "context" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/platform" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/retry" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/policy" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/encoding" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/platform" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/retry" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/common/signal" + "v2ray.com/core/v4/common/task" + "v2ray.com/core/v4/features/policy" + "v2ray.com/core/v4/proxy/vmess" + "v2ray.com/core/v4/proxy/vmess/encoding" + "v2ray.com/core/v4/transport" + "v2ray.com/core/v4/transport/internet" ) // Handler is an outbound connection handler for VMess protocol. diff --git a/proxy/vmess/validator.go b/proxy/vmess/validator.go index 1690fac72..1119e46a4 100644 --- a/proxy/vmess/validator.go +++ b/proxy/vmess/validator.go @@ -7,10 +7,10 @@ import ( "sync" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/task" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/common/task" ) const ( diff --git a/proxy/vmess/validator_test.go b/proxy/vmess/validator_test.go index 1b5160243..fcc237b8f 100644 --- a/proxy/vmess/validator_test.go +++ b/proxy/vmess/validator_test.go @@ -4,11 +4,11 @@ import ( "testing" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" - . "v2ray.com/core/proxy/vmess" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/common/uuid" + . "v2ray.com/core/v4/proxy/vmess" ) func toAccount(a *Account) protocol.Account { diff --git a/testing/mocks/log.go b/testing/mocks/log.go index 7852389f9..6d2ca6191 100644 --- a/testing/mocks/log.go +++ b/testing/mocks/log.go @@ -7,7 +7,7 @@ package mocks import ( gomock "github.com/golang/mock/gomock" reflect "reflect" - log "v2ray.com/core/common/log" + log "v2ray.com/core/v4/common/log" ) // LogHandler is a mock of Handler interface diff --git a/testing/mocks/mux.go b/testing/mocks/mux.go index c9acace12..c98d63eb6 100644 --- a/testing/mocks/mux.go +++ b/testing/mocks/mux.go @@ -7,7 +7,7 @@ package mocks import ( gomock "github.com/golang/mock/gomock" reflect "reflect" - mux "v2ray.com/core/common/mux" + mux "v2ray.com/core/v4/common/mux" ) // MuxClientWorkerFactory is a mock of ClientWorkerFactory interface diff --git a/testing/mocks/outbound.go b/testing/mocks/outbound.go index bcb908e4e..27d1d8094 100644 --- a/testing/mocks/outbound.go +++ b/testing/mocks/outbound.go @@ -8,7 +8,7 @@ import ( context "context" gomock "github.com/golang/mock/gomock" reflect "reflect" - outbound "v2ray.com/core/features/outbound" + outbound "v2ray.com/core/v4/features/outbound" ) // OutboundManager is a mock of Manager interface diff --git a/testing/mocks/proxy.go b/testing/mocks/proxy.go index 50672fd71..edb9bf275 100644 --- a/testing/mocks/proxy.go +++ b/testing/mocks/proxy.go @@ -8,10 +8,10 @@ import ( context "context" gomock "github.com/golang/mock/gomock" reflect "reflect" - net "v2ray.com/core/common/net" - routing "v2ray.com/core/features/routing" - transport "v2ray.com/core/transport" - internet "v2ray.com/core/transport/internet" + net "v2ray.com/core/v4/common/net" + routing "v2ray.com/core/v4/features/routing" + transport "v2ray.com/core/v4/transport" + internet "v2ray.com/core/v4/transport/internet" ) // ProxyInbound is a mock of Inbound interface diff --git a/testing/scenarios/command_test.go b/testing/scenarios/command_test.go index ace50ca0f..76a1506a5 100644 --- a/testing/scenarios/command_test.go +++ b/testing/scenarios/command_test.go @@ -10,25 +10,25 @@ import ( "github.com/google/go-cmp/cmp" "google.golang.org/grpc" - "v2ray.com/core" - "v2ray.com/core/app/commander" - "v2ray.com/core/app/policy" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/app/proxyman/command" - "v2ray.com/core/app/router" - "v2ray.com/core/app/stats" - statscmd "v2ray.com/core/app/stats/command" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/proxy/vmess/outbound" - "v2ray.com/core/testing/servers/tcp" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/commander" + "v2ray.com/core/v4/app/policy" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/app/proxyman/command" + "v2ray.com/core/v4/app/router" + "v2ray.com/core/v4/app/stats" + statscmd "v2ray.com/core/v4/app/stats/command" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/common/uuid" + "v2ray.com/core/v4/proxy/dokodemo" + "v2ray.com/core/v4/proxy/freedom" + "v2ray.com/core/v4/proxy/vmess" + "v2ray.com/core/v4/proxy/vmess/inbound" + "v2ray.com/core/v4/proxy/vmess/outbound" + "v2ray.com/core/v4/testing/servers/tcp" ) func TestCommanderRemoveHandler(t *testing.T) { diff --git a/testing/scenarios/common.go b/testing/scenarios/common.go index 7a7267831..f8af0edeb 100644 --- a/testing/scenarios/common.go +++ b/testing/scenarios/common.go @@ -14,15 +14,15 @@ import ( "github.com/golang/protobuf/proto" "github.com/google/go-cmp/cmp" - "v2ray.com/core" - "v2ray.com/core/app/dispatcher" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/retry" - "v2ray.com/core/common/serial" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/dispatcher" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/errors" + "v2ray.com/core/v4/common/log" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/retry" + "v2ray.com/core/v4/common/serial" ) func xor(b []byte) []byte { diff --git a/testing/scenarios/dns_test.go b/testing/scenarios/dns_test.go index e0ccb5548..f49210ecb 100644 --- a/testing/scenarios/dns_test.go +++ b/testing/scenarios/dns_test.go @@ -6,17 +6,17 @@ import ( "time" xproxy "golang.org/x/net/proxy" - "v2ray.com/core" - "v2ray.com/core/app/dns" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/app/router" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/blackhole" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/socks" - "v2ray.com/core/testing/servers/tcp" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/dns" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/app/router" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/proxy/blackhole" + "v2ray.com/core/v4/proxy/freedom" + "v2ray.com/core/v4/proxy/socks" + "v2ray.com/core/v4/testing/servers/tcp" ) func TestResolveIP(t *testing.T) { diff --git a/testing/scenarios/dokodemo_test.go b/testing/scenarios/dokodemo_test.go index e48117ea7..a4270ca56 100644 --- a/testing/scenarios/dokodemo_test.go +++ b/testing/scenarios/dokodemo_test.go @@ -6,22 +6,22 @@ import ( "golang.org/x/sync/errgroup" - "v2ray.com/core" - "v2ray.com/core/app/log" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - clog "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/proxy/vmess/outbound" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/testing/servers/udp" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/log" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/common" + clog "v2ray.com/core/v4/common/log" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/common/uuid" + "v2ray.com/core/v4/proxy/dokodemo" + "v2ray.com/core/v4/proxy/freedom" + "v2ray.com/core/v4/proxy/vmess" + "v2ray.com/core/v4/proxy/vmess/inbound" + "v2ray.com/core/v4/proxy/vmess/outbound" + "v2ray.com/core/v4/testing/servers/tcp" + "v2ray.com/core/v4/testing/servers/udp" ) func TestDokodemoTCP(t *testing.T) { diff --git a/testing/scenarios/feature_test.go b/testing/scenarios/feature_test.go index 5b09eb806..e52ec3ffe 100644 --- a/testing/scenarios/feature_test.go +++ b/testing/scenarios/feature_test.go @@ -9,30 +9,30 @@ import ( "time" xproxy "golang.org/x/net/proxy" - "v2ray.com/core" - "v2ray.com/core/app/dispatcher" - "v2ray.com/core/app/log" - "v2ray.com/core/app/proxyman" - _ "v2ray.com/core/app/proxyman/inbound" - _ "v2ray.com/core/app/proxyman/outbound" - "v2ray.com/core/app/router" - "v2ray.com/core/common" - clog "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" - "v2ray.com/core/proxy/blackhole" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/freedom" - v2http "v2ray.com/core/proxy/http" - "v2ray.com/core/proxy/socks" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/proxy/vmess/outbound" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/testing/servers/udp" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/dispatcher" + "v2ray.com/core/v4/app/log" + "v2ray.com/core/v4/app/proxyman" + _ "v2ray.com/core/v4/app/proxyman/inbound" + _ "v2ray.com/core/v4/app/proxyman/outbound" + "v2ray.com/core/v4/app/router" + "v2ray.com/core/v4/common" + clog "v2ray.com/core/v4/common/log" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/common/uuid" + "v2ray.com/core/v4/proxy/blackhole" + "v2ray.com/core/v4/proxy/dokodemo" + "v2ray.com/core/v4/proxy/freedom" + v2http "v2ray.com/core/v4/proxy/http" + "v2ray.com/core/v4/proxy/socks" + "v2ray.com/core/v4/proxy/vmess" + "v2ray.com/core/v4/proxy/vmess/inbound" + "v2ray.com/core/v4/proxy/vmess/outbound" + "v2ray.com/core/v4/testing/servers/tcp" + "v2ray.com/core/v4/testing/servers/udp" + "v2ray.com/core/v4/transport/internet" ) func TestPassiveConnection(t *testing.T) { diff --git a/testing/scenarios/http_test.go b/testing/scenarios/http_test.go index 9516ca6ab..251e84f0a 100644 --- a/testing/scenarios/http_test.go +++ b/testing/scenarios/http_test.go @@ -12,16 +12,16 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/freedom" - v2http "v2ray.com/core/proxy/http" - v2httptest "v2ray.com/core/testing/servers/http" - "v2ray.com/core/testing/servers/tcp" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/proxy/freedom" + v2http "v2ray.com/core/v4/proxy/http" + v2httptest "v2ray.com/core/v4/testing/servers/http" + "v2ray.com/core/v4/testing/servers/tcp" ) func TestHttpConformance(t *testing.T) { diff --git a/testing/scenarios/policy_test.go b/testing/scenarios/policy_test.go index 6b712aac5..7ed2b509a 100644 --- a/testing/scenarios/policy_test.go +++ b/testing/scenarios/policy_test.go @@ -7,22 +7,22 @@ import ( "golang.org/x/sync/errgroup" - "v2ray.com/core" - "v2ray.com/core/app/log" - "v2ray.com/core/app/policy" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - clog "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/proxy/vmess/outbound" - "v2ray.com/core/testing/servers/tcp" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/log" + "v2ray.com/core/v4/app/policy" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/common" + clog "v2ray.com/core/v4/common/log" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/common/uuid" + "v2ray.com/core/v4/proxy/dokodemo" + "v2ray.com/core/v4/proxy/freedom" + "v2ray.com/core/v4/proxy/vmess" + "v2ray.com/core/v4/proxy/vmess/inbound" + "v2ray.com/core/v4/proxy/vmess/outbound" + "v2ray.com/core/v4/testing/servers/tcp" ) func startQuickClosingTCPServer() (net.Listener, error) { diff --git a/testing/scenarios/reverse_test.go b/testing/scenarios/reverse_test.go index 4501f8b62..27077dbcd 100644 --- a/testing/scenarios/reverse_test.go +++ b/testing/scenarios/reverse_test.go @@ -6,25 +6,25 @@ import ( "golang.org/x/sync/errgroup" - "v2ray.com/core" - "v2ray.com/core/app/log" - "v2ray.com/core/app/policy" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/app/reverse" - "v2ray.com/core/app/router" - "v2ray.com/core/common" - clog "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" - "v2ray.com/core/proxy/blackhole" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/proxy/vmess/outbound" - "v2ray.com/core/testing/servers/tcp" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/log" + "v2ray.com/core/v4/app/policy" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/app/reverse" + "v2ray.com/core/v4/app/router" + "v2ray.com/core/v4/common" + clog "v2ray.com/core/v4/common/log" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/common/uuid" + "v2ray.com/core/v4/proxy/blackhole" + "v2ray.com/core/v4/proxy/dokodemo" + "v2ray.com/core/v4/proxy/freedom" + "v2ray.com/core/v4/proxy/vmess" + "v2ray.com/core/v4/proxy/vmess/inbound" + "v2ray.com/core/v4/proxy/vmess/outbound" + "v2ray.com/core/v4/testing/servers/tcp" ) func TestReverseProxy(t *testing.T) { diff --git a/testing/scenarios/shadowsocks_test.go b/testing/scenarios/shadowsocks_test.go index 21fd94cf3..86986e631 100644 --- a/testing/scenarios/shadowsocks_test.go +++ b/testing/scenarios/shadowsocks_test.go @@ -8,20 +8,20 @@ import ( "github.com/google/go-cmp/cmp" "golang.org/x/sync/errgroup" - "v2ray.com/core" - "v2ray.com/core/app/log" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" - clog "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/shadowsocks" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/testing/servers/udp" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/log" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/errors" + clog "v2ray.com/core/v4/common/log" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/proxy/dokodemo" + "v2ray.com/core/v4/proxy/freedom" + "v2ray.com/core/v4/proxy/shadowsocks" + "v2ray.com/core/v4/testing/servers/tcp" + "v2ray.com/core/v4/testing/servers/udp" ) func TestShadowsocksAES256TCP(t *testing.T) { diff --git a/testing/scenarios/socks_test.go b/testing/scenarios/socks_test.go index 9763dbc67..871a75ff3 100644 --- a/testing/scenarios/socks_test.go +++ b/testing/scenarios/socks_test.go @@ -7,19 +7,19 @@ import ( xproxy "golang.org/x/net/proxy" socks4 "h12.io/socks" - "v2ray.com/core" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/app/router" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/blackhole" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/socks" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/testing/servers/udp" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/app/router" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/proxy/blackhole" + "v2ray.com/core/v4/proxy/dokodemo" + "v2ray.com/core/v4/proxy/freedom" + "v2ray.com/core/v4/proxy/socks" + "v2ray.com/core/v4/testing/servers/tcp" + "v2ray.com/core/v4/testing/servers/udp" ) func TestSocksBridgeTCP(t *testing.T) { diff --git a/testing/scenarios/tls_test.go b/testing/scenarios/tls_test.go index d8c259d63..8e9d469d7 100644 --- a/testing/scenarios/tls_test.go +++ b/testing/scenarios/tls_test.go @@ -8,25 +8,25 @@ import ( "golang.org/x/sync/errgroup" - "v2ray.com/core" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/protocol/tls/cert" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/proxy/vmess/outbound" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/testing/servers/udp" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/http" - "v2ray.com/core/transport/internet/tls" - "v2ray.com/core/transport/internet/websocket" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/protocol/tls/cert" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/common/uuid" + "v2ray.com/core/v4/proxy/dokodemo" + "v2ray.com/core/v4/proxy/freedom" + "v2ray.com/core/v4/proxy/vmess" + "v2ray.com/core/v4/proxy/vmess/inbound" + "v2ray.com/core/v4/proxy/vmess/outbound" + "v2ray.com/core/v4/testing/servers/tcp" + "v2ray.com/core/v4/testing/servers/udp" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/internet/http" + "v2ray.com/core/v4/transport/internet/tls" + "v2ray.com/core/v4/transport/internet/websocket" ) func TestSimpleTLSConnection(t *testing.T) { diff --git a/testing/scenarios/transport_test.go b/testing/scenarios/transport_test.go index 65ba87606..90e826a19 100644 --- a/testing/scenarios/transport_test.go +++ b/testing/scenarios/transport_test.go @@ -8,27 +8,27 @@ import ( "golang.org/x/sync/errgroup" - "v2ray.com/core" - "v2ray.com/core/app/log" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - clog "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/proxy/vmess/outbound" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/domainsocket" - "v2ray.com/core/transport/internet/headers/http" - "v2ray.com/core/transport/internet/headers/wechat" - "v2ray.com/core/transport/internet/quic" - tcptransport "v2ray.com/core/transport/internet/tcp" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/log" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/common" + clog "v2ray.com/core/v4/common/log" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/common/uuid" + "v2ray.com/core/v4/proxy/dokodemo" + "v2ray.com/core/v4/proxy/freedom" + "v2ray.com/core/v4/proxy/vmess" + "v2ray.com/core/v4/proxy/vmess/inbound" + "v2ray.com/core/v4/proxy/vmess/outbound" + "v2ray.com/core/v4/testing/servers/tcp" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/internet/domainsocket" + "v2ray.com/core/v4/transport/internet/headers/http" + "v2ray.com/core/v4/transport/internet/headers/wechat" + "v2ray.com/core/v4/transport/internet/quic" + tcptransport "v2ray.com/core/v4/transport/internet/tcp" ) func TestHttpConnectionHeader(t *testing.T) { diff --git a/testing/scenarios/vmess_test.go b/testing/scenarios/vmess_test.go index 413da2e8a..6b2670991 100644 --- a/testing/scenarios/vmess_test.go +++ b/testing/scenarios/vmess_test.go @@ -6,24 +6,24 @@ import ( "time" "golang.org/x/sync/errgroup" - "v2ray.com/core" - "v2ray.com/core/app/log" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - clog "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/proxy/vmess/outbound" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/testing/servers/udp" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/kcp" + "v2ray.com/core/v4" + "v2ray.com/core/v4/app/log" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/common" + clog "v2ray.com/core/v4/common/log" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/common/uuid" + "v2ray.com/core/v4/proxy/dokodemo" + "v2ray.com/core/v4/proxy/freedom" + "v2ray.com/core/v4/proxy/vmess" + "v2ray.com/core/v4/proxy/vmess/inbound" + "v2ray.com/core/v4/proxy/vmess/outbound" + "v2ray.com/core/v4/testing/servers/tcp" + "v2ray.com/core/v4/testing/servers/udp" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/internet/kcp" ) func TestVMessDynamicPort(t *testing.T) { diff --git a/testing/servers/http/http.go b/testing/servers/http/http.go index 6bada232c..d5d51e493 100644 --- a/testing/servers/http/http.go +++ b/testing/servers/http/http.go @@ -3,7 +3,7 @@ package tcp import ( "net/http" - "v2ray.com/core/common/net" + "v2ray.com/core/v4/common/net" ) type Server struct { diff --git a/testing/servers/tcp/port.go b/testing/servers/tcp/port.go index cf4729d2c..435d3591b 100644 --- a/testing/servers/tcp/port.go +++ b/testing/servers/tcp/port.go @@ -1,8 +1,8 @@ package tcp import ( - "v2ray.com/core/common" - "v2ray.com/core/common/net" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" ) // PickPort returns an unused TCP port in the system. The port returned is highly likely to be unused, but not guaranteed. diff --git a/testing/servers/tcp/tcp.go b/testing/servers/tcp/tcp.go index 3e0d46db2..7b8ddbc92 100644 --- a/testing/servers/tcp/tcp.go +++ b/testing/servers/tcp/tcp.go @@ -5,11 +5,11 @@ import ( "fmt" "io" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/task" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/pipe" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/task" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/pipe" ) type Server struct { diff --git a/testing/servers/udp/port.go b/testing/servers/udp/port.go index 75da5df44..816fe6b96 100644 --- a/testing/servers/udp/port.go +++ b/testing/servers/udp/port.go @@ -1,8 +1,8 @@ package udp import ( - "v2ray.com/core/common" - "v2ray.com/core/common/net" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" ) // PickPort returns an unused UDP port in the system. The port returned is highly likely to be unused, but not guaranteed. diff --git a/testing/servers/udp/udp.go b/testing/servers/udp/udp.go index 54e947d16..9ccd5e9fb 100644 --- a/testing/servers/udp/udp.go +++ b/testing/servers/udp/udp.go @@ -3,7 +3,7 @@ package udp import ( "fmt" - "v2ray.com/core/common/net" + "v2ray.com/core/v4/common/net" ) type Server struct { diff --git a/transport/config.go b/transport/config.go index 486ea45a6..2936cb756 100644 --- a/transport/config.go +++ b/transport/config.go @@ -1,7 +1,7 @@ package transport import ( - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/transport/internet" ) // Apply applies this Config. diff --git a/transport/config.pb.go b/transport/config.pb.go index 97351b99a..8c7d36186 100644 --- a/transport/config.pb.go +++ b/transport/config.pb.go @@ -4,7 +4,7 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - internet "v2ray.com/core/transport/internet" + internet "v2ray.com/core/v4/transport/internet" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/transport/internet/config.go b/transport/internet/config.go index 92a180803..2c3bf65c3 100644 --- a/transport/internet/config.go +++ b/transport/internet/config.go @@ -1,8 +1,8 @@ package internet import ( - "v2ray.com/core/common/serial" - "v2ray.com/core/features" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/features" ) type ConfigCreator func() interface{} diff --git a/transport/internet/config.pb.go b/transport/internet/config.pb.go index 0281a9d7a..168f2a638 100644 --- a/transport/internet/config.pb.go +++ b/transport/internet/config.pb.go @@ -4,7 +4,7 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - serial "v2ray.com/core/common/serial" + serial "v2ray.com/core/v4/common/serial" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/transport/internet/connection.go b/transport/internet/connection.go index 0c627042b..90bfeda10 100644 --- a/transport/internet/connection.go +++ b/transport/internet/connection.go @@ -3,7 +3,7 @@ package internet import ( "net" - "v2ray.com/core/features/stats" + "v2ray.com/core/v4/features/stats" ) type Connection interface { diff --git a/transport/internet/dialer.go b/transport/internet/dialer.go index 9ac0b3a6a..61e2184b2 100644 --- a/transport/internet/dialer.go +++ b/transport/internet/dialer.go @@ -3,8 +3,8 @@ package internet import ( "context" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/session" ) // Dialer is the interface for dialing outbound connections. diff --git a/transport/internet/dialer_test.go b/transport/internet/dialer_test.go index e9d913670..d1a188ae6 100644 --- a/transport/internet/dialer_test.go +++ b/transport/internet/dialer_test.go @@ -6,10 +6,10 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/testing/servers/tcp" - . "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/testing/servers/tcp" + . "v2ray.com/core/v4/transport/internet" ) func TestDialWithLocalAddr(t *testing.T) { diff --git a/transport/internet/domainsocket/config.go b/transport/internet/domainsocket/config.go index 09cfabb26..e5dcce7f5 100644 --- a/transport/internet/domainsocket/config.go +++ b/transport/internet/domainsocket/config.go @@ -3,9 +3,9 @@ package domainsocket import ( - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/transport/internet" ) const protocolName = "domainsocket" diff --git a/transport/internet/domainsocket/dial.go b/transport/internet/domainsocket/dial.go index bd6591de3..46343cecd 100644 --- a/transport/internet/domainsocket/dial.go +++ b/transport/internet/domainsocket/dial.go @@ -7,10 +7,10 @@ package domainsocket import ( "context" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/internet/tls" ) func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.MemoryStreamConfig) (internet.Connection, error) { diff --git a/transport/internet/domainsocket/errors.generated.go b/transport/internet/domainsocket/errors.generated.go index 645ddaa71..e1c20a648 100644 --- a/transport/internet/domainsocket/errors.generated.go +++ b/transport/internet/domainsocket/errors.generated.go @@ -1,6 +1,6 @@ package domainsocket -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/transport/internet/domainsocket/listener.go b/transport/internet/domainsocket/listener.go index 99457e1fe..57cb34dd4 100644 --- a/transport/internet/domainsocket/listener.go +++ b/transport/internet/domainsocket/listener.go @@ -11,10 +11,10 @@ import ( "strings" "syscall" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/internet/tls" ) type Listener struct { diff --git a/transport/internet/domainsocket/listener_test.go b/transport/internet/domainsocket/listener_test.go index 8ffdc3497..9b3096699 100644 --- a/transport/internet/domainsocket/listener_test.go +++ b/transport/internet/domainsocket/listener_test.go @@ -7,11 +7,11 @@ import ( "runtime" "testing" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" - . "v2ray.com/core/transport/internet/domainsocket" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/transport/internet" + . "v2ray.com/core/v4/transport/internet/domainsocket" ) func TestListen(t *testing.T) { diff --git a/transport/internet/errors.generated.go b/transport/internet/errors.generated.go index b1c035ddd..32314ecbc 100644 --- a/transport/internet/errors.generated.go +++ b/transport/internet/errors.generated.go @@ -1,6 +1,6 @@ package internet -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/transport/internet/header.go b/transport/internet/header.go index 9f71c60d5..9b0a9505c 100644 --- a/transport/internet/header.go +++ b/transport/internet/header.go @@ -4,7 +4,7 @@ import ( "context" "net" - "v2ray.com/core/common" + "v2ray.com/core/v4/common" ) type PacketHeader interface { diff --git a/transport/internet/header_test.go b/transport/internet/header_test.go index 1acbf7f0c..eb84b1bbc 100644 --- a/transport/internet/header_test.go +++ b/transport/internet/header_test.go @@ -3,13 +3,13 @@ package internet_test import ( "testing" - "v2ray.com/core/common" - . "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/headers/noop" - "v2ray.com/core/transport/internet/headers/srtp" - "v2ray.com/core/transport/internet/headers/utp" - "v2ray.com/core/transport/internet/headers/wechat" - "v2ray.com/core/transport/internet/headers/wireguard" + "v2ray.com/core/v4/common" + . "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/internet/headers/noop" + "v2ray.com/core/v4/transport/internet/headers/srtp" + "v2ray.com/core/v4/transport/internet/headers/utp" + "v2ray.com/core/v4/transport/internet/headers/wechat" + "v2ray.com/core/v4/transport/internet/headers/wireguard" ) func TestAllHeadersLoadable(t *testing.T) { diff --git a/transport/internet/headers/http/config.go b/transport/internet/headers/http/config.go index 32a068eb8..a43ebd6b3 100644 --- a/transport/internet/headers/http/config.go +++ b/transport/internet/headers/http/config.go @@ -3,7 +3,7 @@ package http import ( "strings" - "v2ray.com/core/common/dice" + "v2ray.com/core/v4/common/dice" ) func pickString(arr []string) string { diff --git a/transport/internet/headers/http/errors.generated.go b/transport/internet/headers/http/errors.generated.go index 9c6e8e4cb..44ee5f404 100644 --- a/transport/internet/headers/http/errors.generated.go +++ b/transport/internet/headers/http/errors.generated.go @@ -1,6 +1,6 @@ package http -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/transport/internet/headers/http/http.go b/transport/internet/headers/http/http.go index 48c2c990d..ce85c30c4 100644 --- a/transport/internet/headers/http/http.go +++ b/transport/internet/headers/http/http.go @@ -11,8 +11,8 @@ import ( "strings" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" ) const ( diff --git a/transport/internet/headers/http/http_test.go b/transport/internet/headers/http/http_test.go index 0aa0165fd..679549df8 100644 --- a/transport/internet/headers/http/http_test.go +++ b/transport/internet/headers/http/http_test.go @@ -7,10 +7,10 @@ import ( "testing" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - . "v2ray.com/core/transport/internet/headers/http" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + . "v2ray.com/core/v4/transport/internet/headers/http" ) func TestReaderWriter(t *testing.T) { diff --git a/transport/internet/headers/noop/noop.go b/transport/internet/headers/noop/noop.go index e622b35ef..d01fbeaaf 100644 --- a/transport/internet/headers/noop/noop.go +++ b/transport/internet/headers/noop/noop.go @@ -4,7 +4,7 @@ import ( "context" "net" - "v2ray.com/core/common" + "v2ray.com/core/v4/common" ) type NoOpHeader struct{} diff --git a/transport/internet/headers/srtp/srtp.go b/transport/internet/headers/srtp/srtp.go index cf881cbe5..5af2fec42 100644 --- a/transport/internet/headers/srtp/srtp.go +++ b/transport/internet/headers/srtp/srtp.go @@ -4,8 +4,8 @@ import ( "context" "encoding/binary" - "v2ray.com/core/common" - "v2ray.com/core/common/dice" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/dice" ) type SRTP struct { diff --git a/transport/internet/headers/srtp/srtp_test.go b/transport/internet/headers/srtp/srtp_test.go index 128961129..7eb44c94d 100644 --- a/transport/internet/headers/srtp/srtp_test.go +++ b/transport/internet/headers/srtp/srtp_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - . "v2ray.com/core/transport/internet/headers/srtp" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + . "v2ray.com/core/v4/transport/internet/headers/srtp" ) func TestSRTPWrite(t *testing.T) { diff --git a/transport/internet/headers/tls/dtls.go b/transport/internet/headers/tls/dtls.go index e48ab6e99..b199b5db7 100644 --- a/transport/internet/headers/tls/dtls.go +++ b/transport/internet/headers/tls/dtls.go @@ -3,8 +3,8 @@ package tls import ( "context" - "v2ray.com/core/common" - "v2ray.com/core/common/dice" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/dice" ) // DTLS writes header as DTLS. See https://tools.ietf.org/html/rfc6347 diff --git a/transport/internet/headers/tls/dtls_test.go b/transport/internet/headers/tls/dtls_test.go index e26aab37f..4fa1d0d7a 100644 --- a/transport/internet/headers/tls/dtls_test.go +++ b/transport/internet/headers/tls/dtls_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - . "v2ray.com/core/transport/internet/headers/tls" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + . "v2ray.com/core/v4/transport/internet/headers/tls" ) func TestDTLSWrite(t *testing.T) { diff --git a/transport/internet/headers/utp/utp.go b/transport/internet/headers/utp/utp.go index 0ed164ca9..d1ea2dbe8 100644 --- a/transport/internet/headers/utp/utp.go +++ b/transport/internet/headers/utp/utp.go @@ -4,8 +4,8 @@ import ( "context" "encoding/binary" - "v2ray.com/core/common" - "v2ray.com/core/common/dice" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/dice" ) type UTP struct { diff --git a/transport/internet/headers/utp/utp_test.go b/transport/internet/headers/utp/utp_test.go index de8955240..cefe88c20 100644 --- a/transport/internet/headers/utp/utp_test.go +++ b/transport/internet/headers/utp/utp_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - . "v2ray.com/core/transport/internet/headers/utp" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + . "v2ray.com/core/v4/transport/internet/headers/utp" ) func TestUTPWrite(t *testing.T) { diff --git a/transport/internet/headers/wechat/wechat.go b/transport/internet/headers/wechat/wechat.go index 8cbb603b3..e8b1b5914 100644 --- a/transport/internet/headers/wechat/wechat.go +++ b/transport/internet/headers/wechat/wechat.go @@ -4,8 +4,8 @@ import ( "context" "encoding/binary" - "v2ray.com/core/common" - "v2ray.com/core/common/dice" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/dice" ) type VideoChat struct { diff --git a/transport/internet/headers/wechat/wechat_test.go b/transport/internet/headers/wechat/wechat_test.go index 083929ef8..27d10e932 100644 --- a/transport/internet/headers/wechat/wechat_test.go +++ b/transport/internet/headers/wechat/wechat_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - . "v2ray.com/core/transport/internet/headers/wechat" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + . "v2ray.com/core/v4/transport/internet/headers/wechat" ) func TestUTPWrite(t *testing.T) { diff --git a/transport/internet/headers/wireguard/wireguard.go b/transport/internet/headers/wireguard/wireguard.go index 466f48e6a..18d4b90a2 100644 --- a/transport/internet/headers/wireguard/wireguard.go +++ b/transport/internet/headers/wireguard/wireguard.go @@ -3,7 +3,7 @@ package wireguard import ( "context" - "v2ray.com/core/common" + "v2ray.com/core/v4/common" ) type Wireguard struct{} diff --git a/transport/internet/http/config.go b/transport/internet/http/config.go index b433e331c..10fc5d7ba 100644 --- a/transport/internet/http/config.go +++ b/transport/internet/http/config.go @@ -3,9 +3,9 @@ package http import ( - "v2ray.com/core/common" - "v2ray.com/core/common/dice" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/dice" + "v2ray.com/core/v4/transport/internet" ) const protocolName = "http" diff --git a/transport/internet/http/dialer.go b/transport/internet/http/dialer.go index 98187d955..3e8caffb0 100644 --- a/transport/internet/http/dialer.go +++ b/transport/internet/http/dialer.go @@ -10,12 +10,12 @@ import ( "sync" "golang.org/x/net/http2" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" - "v2ray.com/core/transport/pipe" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/internet/tls" + "v2ray.com/core/v4/transport/pipe" ) var ( diff --git a/transport/internet/http/errors.generated.go b/transport/internet/http/errors.generated.go index 9c6e8e4cb..44ee5f404 100644 --- a/transport/internet/http/errors.generated.go +++ b/transport/internet/http/errors.generated.go @@ -1,6 +1,6 @@ package http -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/transport/internet/http/http_test.go b/transport/internet/http/http_test.go index b1c3ef8a4..6e8346c3a 100644 --- a/transport/internet/http/http_test.go +++ b/transport/internet/http/http_test.go @@ -8,14 +8,14 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol/tls/cert" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/transport/internet" - . "v2ray.com/core/transport/internet/http" - "v2ray.com/core/transport/internet/tls" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol/tls/cert" + "v2ray.com/core/v4/testing/servers/tcp" + "v2ray.com/core/v4/transport/internet" + . "v2ray.com/core/v4/transport/internet/http" + "v2ray.com/core/v4/transport/internet/tls" ) func TestHTTPConnection(t *testing.T) { diff --git a/transport/internet/http/hub.go b/transport/internet/http/hub.go index 32fb30907..9b76bc0b4 100644 --- a/transport/internet/http/hub.go +++ b/transport/internet/http/hub.go @@ -9,13 +9,13 @@ import ( "strings" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal/done" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/common/signal/done" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/internet/tls" "golang.org/x/net/http2" "golang.org/x/net/http2/h2c" diff --git a/transport/internet/kcp/config.go b/transport/internet/kcp/config.go index 830861068..0c862e98a 100644 --- a/transport/internet/kcp/config.go +++ b/transport/internet/kcp/config.go @@ -5,8 +5,8 @@ package kcp import ( "crypto/cipher" - "v2ray.com/core/common" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/transport/internet" ) const protocolName = "mkcp" diff --git a/transport/internet/kcp/config.pb.go b/transport/internet/kcp/config.pb.go index 1cc3854e9..a3abc0be9 100644 --- a/transport/internet/kcp/config.pb.go +++ b/transport/internet/kcp/config.pb.go @@ -4,7 +4,7 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - serial "v2ray.com/core/common/serial" + serial "v2ray.com/core/v4/common/serial" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/transport/internet/kcp/connection.go b/transport/internet/kcp/connection.go index e5227ecd5..5517cb566 100644 --- a/transport/internet/kcp/connection.go +++ b/transport/internet/kcp/connection.go @@ -11,9 +11,9 @@ import ( "sync/atomic" "time" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/signal/semaphore" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/signal" + "v2ray.com/core/v4/common/signal/semaphore" ) var ( diff --git a/transport/internet/kcp/connection_test.go b/transport/internet/kcp/connection_test.go index 0d80dd225..a69a4f5f9 100644 --- a/transport/internet/kcp/connection_test.go +++ b/transport/internet/kcp/connection_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "v2ray.com/core/common/buf" - . "v2ray.com/core/transport/internet/kcp" + "v2ray.com/core/v4/common/buf" + . "v2ray.com/core/v4/transport/internet/kcp" ) type NoOpCloser int diff --git a/transport/internet/kcp/crypt.go b/transport/internet/kcp/crypt.go index 35bf55eac..b863a7887 100644 --- a/transport/internet/kcp/crypt.go +++ b/transport/internet/kcp/crypt.go @@ -7,7 +7,7 @@ import ( "encoding/binary" "hash/fnv" - "v2ray.com/core/common" + "v2ray.com/core/v4/common" ) // SimpleAuthenticator is a legacy AEAD used for KCP encryption. diff --git a/transport/internet/kcp/crypt_test.go b/transport/internet/kcp/crypt_test.go index c1b9ffd7e..8e6b27a7d 100644 --- a/transport/internet/kcp/crypt_test.go +++ b/transport/internet/kcp/crypt_test.go @@ -5,8 +5,8 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - . "v2ray.com/core/transport/internet/kcp" + "v2ray.com/core/v4/common" + . "v2ray.com/core/v4/transport/internet/kcp" ) func TestSimpleAuthenticator(t *testing.T) { diff --git a/transport/internet/kcp/dialer.go b/transport/internet/kcp/dialer.go index b0531b500..5a236cff7 100644 --- a/transport/internet/kcp/dialer.go +++ b/transport/internet/kcp/dialer.go @@ -8,12 +8,12 @@ import ( "io" "sync/atomic" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/dice" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" - v2tls "v2ray.com/core/transport/internet/tls" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/dice" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/transport/internet" + v2tls "v2ray.com/core/v4/transport/internet/tls" ) var ( diff --git a/transport/internet/kcp/errors.generated.go b/transport/internet/kcp/errors.generated.go index 1f342be9f..b43abcadc 100644 --- a/transport/internet/kcp/errors.generated.go +++ b/transport/internet/kcp/errors.generated.go @@ -1,6 +1,6 @@ package kcp -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/transport/internet/kcp/io.go b/transport/internet/kcp/io.go index a4cb8ed5f..5a61764e5 100644 --- a/transport/internet/kcp/io.go +++ b/transport/internet/kcp/io.go @@ -7,9 +7,9 @@ import ( "crypto/rand" "io" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/transport/internet" ) type PacketReader interface { diff --git a/transport/internet/kcp/io_test.go b/transport/internet/kcp/io_test.go index 68838fc81..d39ef73fb 100644 --- a/transport/internet/kcp/io_test.go +++ b/transport/internet/kcp/io_test.go @@ -3,7 +3,7 @@ package kcp_test import ( "testing" - . "v2ray.com/core/transport/internet/kcp" + . "v2ray.com/core/v4/transport/internet/kcp" ) func TestKCPPacketReader(t *testing.T) { diff --git a/transport/internet/kcp/kcp_test.go b/transport/internet/kcp/kcp_test.go index f241fe5f0..d9ae94a1b 100644 --- a/transport/internet/kcp/kcp_test.go +++ b/transport/internet/kcp/kcp_test.go @@ -10,11 +10,11 @@ import ( "github.com/google/go-cmp/cmp" "golang.org/x/sync/errgroup" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" - . "v2ray.com/core/transport/internet/kcp" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/errors" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/transport/internet" + . "v2ray.com/core/v4/transport/internet/kcp" ) func TestDialAndListen(t *testing.T) { diff --git a/transport/internet/kcp/listener.go b/transport/internet/kcp/listener.go index 8e141c6b5..a66cc5895 100644 --- a/transport/internet/kcp/listener.go +++ b/transport/internet/kcp/listener.go @@ -8,12 +8,12 @@ import ( "crypto/tls" "sync" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" - v2tls "v2ray.com/core/transport/internet/tls" - "v2ray.com/core/transport/internet/udp" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/transport/internet" + v2tls "v2ray.com/core/v4/transport/internet/tls" + "v2ray.com/core/v4/transport/internet/udp" ) type ConnectionID struct { diff --git a/transport/internet/kcp/output.go b/transport/internet/kcp/output.go index 5f4a1dc2a..d0d8b8e52 100644 --- a/transport/internet/kcp/output.go +++ b/transport/internet/kcp/output.go @@ -6,9 +6,9 @@ import ( "io" "sync" - "v2ray.com/core/common/retry" + "v2ray.com/core/v4/common/retry" - "v2ray.com/core/common/buf" + "v2ray.com/core/v4/common/buf" ) type SegmentWriter interface { diff --git a/transport/internet/kcp/receiving.go b/transport/internet/kcp/receiving.go index abdedb9ec..566d03675 100644 --- a/transport/internet/kcp/receiving.go +++ b/transport/internet/kcp/receiving.go @@ -5,7 +5,7 @@ package kcp import ( "sync" - "v2ray.com/core/common/buf" + "v2ray.com/core/v4/common/buf" ) type ReceivingWindow struct { diff --git a/transport/internet/kcp/segment.go b/transport/internet/kcp/segment.go index 1f3f31db7..3d0398911 100755 --- a/transport/internet/kcp/segment.go +++ b/transport/internet/kcp/segment.go @@ -5,7 +5,7 @@ package kcp import ( "encoding/binary" - "v2ray.com/core/common/buf" + "v2ray.com/core/v4/common/buf" ) // Command is a KCP command that indicate the purpose of a Segment. diff --git a/transport/internet/kcp/segment_test.go b/transport/internet/kcp/segment_test.go index 98734cbcf..69e8d520c 100644 --- a/transport/internet/kcp/segment_test.go +++ b/transport/internet/kcp/segment_test.go @@ -6,7 +6,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - . "v2ray.com/core/transport/internet/kcp" + . "v2ray.com/core/v4/transport/internet/kcp" ) func TestBadSegment(t *testing.T) { diff --git a/transport/internet/kcp/sending.go b/transport/internet/kcp/sending.go index 38b120113..caffe83d4 100644 --- a/transport/internet/kcp/sending.go +++ b/transport/internet/kcp/sending.go @@ -6,7 +6,7 @@ import ( "container/list" "sync" - "v2ray.com/core/common/buf" + "v2ray.com/core/v4/common/buf" ) type SendingWindow struct { diff --git a/transport/internet/quic/config.go b/transport/internet/quic/config.go index d9dcff3a4..da16afed0 100644 --- a/transport/internet/quic/config.go +++ b/transport/internet/quic/config.go @@ -8,9 +8,9 @@ import ( "crypto/sha256" "golang.org/x/crypto/chacha20poly1305" - "v2ray.com/core/common" - "v2ray.com/core/common/protocol" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/transport/internet" ) func getAuth(config *Config) (cipher.AEAD, error) { diff --git a/transport/internet/quic/config.pb.go b/transport/internet/quic/config.pb.go index 7bc45d7a0..811f5f82d 100644 --- a/transport/internet/quic/config.pb.go +++ b/transport/internet/quic/config.pb.go @@ -4,8 +4,8 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - protocol "v2ray.com/core/common/protocol" - serial "v2ray.com/core/common/serial" + protocol "v2ray.com/core/v4/common/protocol" + serial "v2ray.com/core/v4/common/serial" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/transport/internet/quic/conn.go b/transport/internet/quic/conn.go index 7f039fe16..f7b85fe4f 100644 --- a/transport/internet/quic/conn.go +++ b/transport/internet/quic/conn.go @@ -8,11 +8,11 @@ import ( "errors" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - quic "v2ray.com/core/external/github.com/lucas-clemente/quic-go" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + quic "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go" + "v2ray.com/core/v4/transport/internet" ) type sysConn struct { diff --git a/transport/internet/quic/dialer.go b/transport/internet/quic/dialer.go index 1a382eb11..d81f2b95d 100644 --- a/transport/internet/quic/dialer.go +++ b/transport/internet/quic/dialer.go @@ -7,12 +7,12 @@ import ( "sync" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/task" - quic "v2ray.com/core/external/github.com/lucas-clemente/quic-go" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/task" + quic "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/internet/tls" ) type sessionContext struct { diff --git a/transport/internet/quic/errors.generated.go b/transport/internet/quic/errors.generated.go index b43c161ac..95c677182 100644 --- a/transport/internet/quic/errors.generated.go +++ b/transport/internet/quic/errors.generated.go @@ -1,6 +1,6 @@ package quic -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/transport/internet/quic/hub.go b/transport/internet/quic/hub.go index 11865f692..fd6a05053 100644 --- a/transport/internet/quic/hub.go +++ b/transport/internet/quic/hub.go @@ -6,13 +6,13 @@ import ( "context" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol/tls/cert" - "v2ray.com/core/common/signal/done" - quic "v2ray.com/core/external/github.com/lucas-clemente/quic-go" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol/tls/cert" + "v2ray.com/core/v4/common/signal/done" + quic "v2ray.com/core/v4/external/github.com/lucas-clemente/quic-go" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/internet/tls" ) // Listener is an internet.Listener that listens for TCP connections. diff --git a/transport/internet/quic/pool.go b/transport/internet/quic/pool.go index 2e2032da4..68514ae9c 100644 --- a/transport/internet/quic/pool.go +++ b/transport/internet/quic/pool.go @@ -5,7 +5,7 @@ package quic import ( "sync" - "v2ray.com/core/common/bytespool" + "v2ray.com/core/v4/common/bytespool" ) var pool *sync.Pool diff --git a/transport/internet/quic/quic.go b/transport/internet/quic/quic.go index 1ec3b3cfb..6661d2f89 100644 --- a/transport/internet/quic/quic.go +++ b/transport/internet/quic/quic.go @@ -3,8 +3,8 @@ package quic import ( - "v2ray.com/core/common" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/transport/internet" ) //go:generate errorgen diff --git a/transport/internet/quic/quic_test.go b/transport/internet/quic/quic_test.go index 3f42bd8cd..1a1a28279 100644 --- a/transport/internet/quic/quic_test.go +++ b/transport/internet/quic/quic_test.go @@ -8,17 +8,17 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/protocol/tls/cert" - "v2ray.com/core/common/serial" - "v2ray.com/core/testing/servers/udp" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/headers/wireguard" - "v2ray.com/core/transport/internet/quic" - "v2ray.com/core/transport/internet/tls" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/protocol/tls/cert" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/testing/servers/udp" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/internet/headers/wireguard" + "v2ray.com/core/v4/transport/internet/quic" + "v2ray.com/core/v4/transport/internet/tls" ) func TestQuicConnection(t *testing.T) { diff --git a/transport/internet/sockopt_linux_test.go b/transport/internet/sockopt_linux_test.go index 9221384cb..dff610e7e 100644 --- a/transport/internet/sockopt_linux_test.go +++ b/transport/internet/sockopt_linux_test.go @@ -5,10 +5,10 @@ import ( "syscall" "testing" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/testing/servers/tcp" - . "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/testing/servers/tcp" + . "v2ray.com/core/v4/transport/internet" ) func TestSockOptMark(t *testing.T) { diff --git a/transport/internet/sockopt_test.go b/transport/internet/sockopt_test.go index 2bef2b2e9..e9e039bf0 100644 --- a/transport/internet/sockopt_test.go +++ b/transport/internet/sockopt_test.go @@ -5,10 +5,10 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/testing/servers/tcp" - . "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/testing/servers/tcp" + . "v2ray.com/core/v4/transport/internet" ) func TestTCPFastOpen(t *testing.T) { diff --git a/transport/internet/system_dialer.go b/transport/internet/system_dialer.go index d0ab52bb0..5a657454d 100644 --- a/transport/internet/system_dialer.go +++ b/transport/internet/system_dialer.go @@ -5,8 +5,8 @@ import ( "syscall" "time" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/session" ) var ( diff --git a/transport/internet/system_listener.go b/transport/internet/system_listener.go index 3ab8d3a84..82907ebd3 100644 --- a/transport/internet/system_listener.go +++ b/transport/internet/system_listener.go @@ -4,8 +4,8 @@ import ( "context" "syscall" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/session" ) var ( diff --git a/transport/internet/system_listener_test.go b/transport/internet/system_listener_test.go index ae4136155..6c433dce4 100644 --- a/transport/internet/system_listener_test.go +++ b/transport/internet/system_listener_test.go @@ -5,8 +5,8 @@ import ( "net" "testing" - "v2ray.com/core/common" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/transport/internet" ) func TestRegisterListenerController(t *testing.T) { diff --git a/transport/internet/tcp/config.go b/transport/internet/tcp/config.go index f1bbcebb3..65e6a9ea8 100644 --- a/transport/internet/tcp/config.go +++ b/transport/internet/tcp/config.go @@ -3,8 +3,8 @@ package tcp import ( - "v2ray.com/core/common" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/transport/internet" ) const protocolName = "tcp" diff --git a/transport/internet/tcp/config.pb.go b/transport/internet/tcp/config.pb.go index 1b4eb90c8..fdb35858b 100644 --- a/transport/internet/tcp/config.pb.go +++ b/transport/internet/tcp/config.pb.go @@ -4,7 +4,7 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" - serial "v2ray.com/core/common/serial" + serial "v2ray.com/core/v4/common/serial" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/transport/internet/tcp/dialer.go b/transport/internet/tcp/dialer.go index 7c7d86c1a..ea581100f 100644 --- a/transport/internet/tcp/dialer.go +++ b/transport/internet/tcp/dialer.go @@ -5,11 +5,11 @@ package tcp import ( "context" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/internet/tls" ) // Dial dials a new TCP connection to the given destination. diff --git a/transport/internet/tcp/errors.generated.go b/transport/internet/tcp/errors.generated.go index e1ad6289b..0b59d4fd9 100644 --- a/transport/internet/tcp/errors.generated.go +++ b/transport/internet/tcp/errors.generated.go @@ -1,6 +1,6 @@ package tcp -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/transport/internet/tcp/hub.go b/transport/internet/tcp/hub.go index f3e6ade0c..9602ef553 100644 --- a/transport/internet/tcp/hub.go +++ b/transport/internet/tcp/hub.go @@ -8,11 +8,11 @@ import ( "strings" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/internet/tls" ) // Listener is an internet.Listener that listens for TCP connections. diff --git a/transport/internet/tcp/sockopt_linux.go b/transport/internet/tcp/sockopt_linux.go index a5ebca737..e885e51f4 100644 --- a/transport/internet/tcp/sockopt_linux.go +++ b/transport/internet/tcp/sockopt_linux.go @@ -6,8 +6,8 @@ package tcp import ( "syscall" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/transport/internet" ) const SO_ORIGINAL_DST = 80 diff --git a/transport/internet/tcp/sockopt_linux_test.go b/transport/internet/tcp/sockopt_linux_test.go index b4c77638d..663f9ec49 100644 --- a/transport/internet/tcp/sockopt_linux_test.go +++ b/transport/internet/tcp/sockopt_linux_test.go @@ -7,10 +7,10 @@ import ( "strings" "testing" - "v2ray.com/core/common" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/transport/internet" - . "v2ray.com/core/transport/internet/tcp" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/testing/servers/tcp" + "v2ray.com/core/v4/transport/internet" + . "v2ray.com/core/v4/transport/internet/tcp" ) func TestGetOriginalDestination(t *testing.T) { diff --git a/transport/internet/tcp_hub.go b/transport/internet/tcp_hub.go index efb72bfbb..c4436445a 100644 --- a/transport/internet/tcp_hub.go +++ b/transport/internet/tcp_hub.go @@ -3,7 +3,7 @@ package internet import ( "context" - "v2ray.com/core/common/net" + "v2ray.com/core/v4/common/net" ) var ( diff --git a/transport/internet/tls/config.go b/transport/internet/tls/config.go index 1d41ed4aa..df5016d69 100644 --- a/transport/internet/tls/config.go +++ b/transport/internet/tls/config.go @@ -9,9 +9,9 @@ import ( "sync" "time" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol/tls/cert" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol/tls/cert" + "v2ray.com/core/v4/transport/internet" ) var ( diff --git a/transport/internet/tls/config_test.go b/transport/internet/tls/config_test.go index 7061428cc..2d1188d1c 100644 --- a/transport/internet/tls/config_test.go +++ b/transport/internet/tls/config_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/protocol/tls/cert" - . "v2ray.com/core/transport/internet/tls" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/protocol/tls/cert" + . "v2ray.com/core/v4/transport/internet/tls" ) func TestCertificateIssuing(t *testing.T) { diff --git a/transport/internet/tls/errors.generated.go b/transport/internet/tls/errors.generated.go index 080eeb749..3345661dc 100644 --- a/transport/internet/tls/errors.generated.go +++ b/transport/internet/tls/errors.generated.go @@ -1,6 +1,6 @@ package tls -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/transport/internet/tls/tls.go b/transport/internet/tls/tls.go index 90b60e021..d74e388f3 100644 --- a/transport/internet/tls/tls.go +++ b/transport/internet/tls/tls.go @@ -5,8 +5,8 @@ package tls import ( "crypto/tls" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" utls "github.com/refraction-networking/utls" ) diff --git a/transport/internet/udp/config.go b/transport/internet/udp/config.go index f79568cdc..54ed78b34 100644 --- a/transport/internet/udp/config.go +++ b/transport/internet/udp/config.go @@ -1,8 +1,8 @@ package udp import ( - "v2ray.com/core/common" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/transport/internet" ) func init() { diff --git a/transport/internet/udp/dialer.go b/transport/internet/udp/dialer.go index 5ef5a4c0b..50fcb7df5 100644 --- a/transport/internet/udp/dialer.go +++ b/transport/internet/udp/dialer.go @@ -3,9 +3,9 @@ package udp import ( "context" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/transport/internet" ) func init() { diff --git a/transport/internet/udp/dispatcher.go b/transport/internet/udp/dispatcher.go index f83bf6a6f..f0b1acb10 100644 --- a/transport/internet/udp/dispatcher.go +++ b/transport/internet/udp/dispatcher.go @@ -6,16 +6,16 @@ import ( "sync" "time" - "v2ray.com/core/common/signal/done" + "v2ray.com/core/v4/common/signal/done" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol/udp" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol/udp" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/common/signal" + "v2ray.com/core/v4/features/routing" + "v2ray.com/core/v4/transport" ) type ResponseCallback func(ctx context.Context, packet *udp.Packet) diff --git a/transport/internet/udp/dispatcher_test.go b/transport/internet/udp/dispatcher_test.go index e75aa5a17..615f85fbc 100644 --- a/transport/internet/udp/dispatcher_test.go +++ b/transport/internet/udp/dispatcher_test.go @@ -6,14 +6,14 @@ import ( "testing" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol/udp" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport" - . "v2ray.com/core/transport/internet/udp" - "v2ray.com/core/transport/pipe" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol/udp" + "v2ray.com/core/v4/features/routing" + "v2ray.com/core/v4/transport" + . "v2ray.com/core/v4/transport/internet/udp" + "v2ray.com/core/v4/transport/pipe" ) type TestDispatcher struct { diff --git a/transport/internet/udp/errors.generated.go b/transport/internet/udp/errors.generated.go index 62a875701..997c274d2 100644 --- a/transport/internet/udp/errors.generated.go +++ b/transport/internet/udp/errors.generated.go @@ -1,6 +1,6 @@ package udp -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/transport/internet/udp/hub.go b/transport/internet/udp/hub.go index d1c7992cd..17f8979f6 100644 --- a/transport/internet/udp/hub.go +++ b/transport/internet/udp/hub.go @@ -3,10 +3,10 @@ package udp import ( "context" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol/udp" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol/udp" + "v2ray.com/core/v4/transport/internet" ) type HubOption func(h *Hub) diff --git a/transport/internet/udp/hub_linux.go b/transport/internet/udp/hub_linux.go index e7f4d9231..6e67fe80e 100644 --- a/transport/internet/udp/hub_linux.go +++ b/transport/internet/udp/hub_linux.go @@ -5,7 +5,7 @@ package udp import ( "syscall" - "v2ray.com/core/common/net" + "v2ray.com/core/v4/common/net" ) func RetrieveOriginalDest(oob []byte) net.Destination { diff --git a/transport/internet/websocket/config.go b/transport/internet/websocket/config.go index 982cf7309..d1da857aa 100644 --- a/transport/internet/websocket/config.go +++ b/transport/internet/websocket/config.go @@ -5,8 +5,8 @@ package websocket import ( "net/http" - "v2ray.com/core/common" - "v2ray.com/core/transport/internet" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/transport/internet" ) const protocolName = "websocket" diff --git a/transport/internet/websocket/connection.go b/transport/internet/websocket/connection.go index c63d6b57b..9f814c363 100644 --- a/transport/internet/websocket/connection.go +++ b/transport/internet/websocket/connection.go @@ -8,9 +8,9 @@ import ( "time" "github.com/gorilla/websocket" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/serial" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/errors" + "v2ray.com/core/v4/common/serial" ) var ( diff --git a/transport/internet/websocket/dialer.go b/transport/internet/websocket/dialer.go index 98b66d018..67a0d36be 100644 --- a/transport/internet/websocket/dialer.go +++ b/transport/internet/websocket/dialer.go @@ -7,11 +7,11 @@ import ( "time" "github.com/gorilla/websocket" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/internet/tls" ) // Dial dials a WebSocket connection to the given destination. diff --git a/transport/internet/websocket/errors.generated.go b/transport/internet/websocket/errors.generated.go index 1633cdf02..2e526a5e4 100644 --- a/transport/internet/websocket/errors.generated.go +++ b/transport/internet/websocket/errors.generated.go @@ -1,6 +1,6 @@ package websocket -import "v2ray.com/core/common/errors" +import "v2ray.com/core/v4/common/errors" type errPathObjHolder struct{} diff --git a/transport/internet/websocket/hub.go b/transport/internet/websocket/hub.go index 1e0d336bf..8ee848984 100644 --- a/transport/internet/websocket/hub.go +++ b/transport/internet/websocket/hub.go @@ -10,12 +10,12 @@ import ( "time" "github.com/gorilla/websocket" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - http_proto "v2ray.com/core/common/protocol/http" - "v2ray.com/core/common/session" - "v2ray.com/core/transport/internet" - v2tls "v2ray.com/core/transport/internet/tls" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + http_proto "v2ray.com/core/v4/common/protocol/http" + "v2ray.com/core/v4/common/session" + "v2ray.com/core/v4/transport/internet" + v2tls "v2ray.com/core/v4/transport/internet/tls" ) type requestHandler struct { diff --git a/transport/internet/websocket/ws_test.go b/transport/internet/websocket/ws_test.go index db919b342..a1873a833 100644 --- a/transport/internet/websocket/ws_test.go +++ b/transport/internet/websocket/ws_test.go @@ -6,12 +6,12 @@ import ( "testing" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol/tls/cert" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" - . "v2ray.com/core/transport/internet/websocket" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol/tls/cert" + "v2ray.com/core/v4/transport/internet" + "v2ray.com/core/v4/transport/internet/tls" + . "v2ray.com/core/v4/transport/internet/websocket" ) func Test_listenWSAndDial(t *testing.T) { diff --git a/transport/link.go b/transport/link.go index 0a17f8dba..adde7e6e3 100644 --- a/transport/link.go +++ b/transport/link.go @@ -1,6 +1,6 @@ package transport -import "v2ray.com/core/common/buf" +import "v2ray.com/core/v4/common/buf" // Link is a utility for connecting between an inbound and an outbound proxy handler. type Link struct { diff --git a/transport/pipe/impl.go b/transport/pipe/impl.go index d560992b0..d899588e5 100644 --- a/transport/pipe/impl.go +++ b/transport/pipe/impl.go @@ -7,10 +7,10 @@ import ( "sync" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/signal/done" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + "v2ray.com/core/v4/common/signal" + "v2ray.com/core/v4/common/signal/done" ) type state byte diff --git a/transport/pipe/pipe.go b/transport/pipe/pipe.go index 4c9ced01d..482e4a2da 100644 --- a/transport/pipe/pipe.go +++ b/transport/pipe/pipe.go @@ -3,9 +3,9 @@ package pipe import ( "context" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/signal/done" - "v2ray.com/core/features/policy" + "v2ray.com/core/v4/common/signal" + "v2ray.com/core/v4/common/signal/done" + "v2ray.com/core/v4/features/policy" ) // Option for creating new Pipes. diff --git a/transport/pipe/pipe_test.go b/transport/pipe/pipe_test.go index 1f7fb9563..d21fc0a8e 100644 --- a/transport/pipe/pipe_test.go +++ b/transport/pipe/pipe_test.go @@ -9,9 +9,9 @@ import ( "github.com/google/go-cmp/cmp" "golang.org/x/sync/errgroup" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - . "v2ray.com/core/transport/pipe" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/buf" + . "v2ray.com/core/v4/transport/pipe" ) func TestPipeReadWrite(t *testing.T) { diff --git a/transport/pipe/reader.go b/transport/pipe/reader.go index 0f0b5b9c2..c37bce832 100644 --- a/transport/pipe/reader.go +++ b/transport/pipe/reader.go @@ -3,7 +3,7 @@ package pipe import ( "time" - "v2ray.com/core/common/buf" + "v2ray.com/core/v4/common/buf" ) // Reader is a buf.Reader that reads content from a pipe. diff --git a/transport/pipe/writer.go b/transport/pipe/writer.go index f95340788..2355c88b4 100644 --- a/transport/pipe/writer.go +++ b/transport/pipe/writer.go @@ -1,7 +1,7 @@ package pipe import ( - "v2ray.com/core/common/buf" + "v2ray.com/core/v4/common/buf" ) // Writer is a buf.Writer that writes data into a pipe. diff --git a/v2ray.go b/v2ray.go index 9b47b3682..f3f3a8761 100755 --- a/v2ray.go +++ b/v2ray.go @@ -7,16 +7,16 @@ import ( "reflect" "sync" - "v2ray.com/core/common" - "v2ray.com/core/common/serial" - "v2ray.com/core/features" - "v2ray.com/core/features/dns" - "v2ray.com/core/features/dns/localdns" - "v2ray.com/core/features/inbound" - "v2ray.com/core/features/outbound" - "v2ray.com/core/features/policy" - "v2ray.com/core/features/routing" - "v2ray.com/core/features/stats" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/features" + "v2ray.com/core/v4/features/dns" + "v2ray.com/core/v4/features/dns/localdns" + "v2ray.com/core/v4/features/inbound" + "v2ray.com/core/v4/features/outbound" + "v2ray.com/core/v4/features/policy" + "v2ray.com/core/v4/features/routing" + "v2ray.com/core/v4/features/stats" ) // Server is an instance of V2Ray. At any time, there must be at most one Server instance running. diff --git a/v2ray_test.go b/v2ray_test.go index 8b93d5c5f..e945c947f 100644 --- a/v2ray_test.go +++ b/v2ray_test.go @@ -4,21 +4,21 @@ import ( "testing" proto "github.com/golang/protobuf/proto" - . "v2ray.com/core" - "v2ray.com/core/app/dispatcher" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" - "v2ray.com/core/features/dns" - "v2ray.com/core/features/dns/localdns" - _ "v2ray.com/core/main/distro/all" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/outbound" - "v2ray.com/core/testing/servers/tcp" + . "v2ray.com/core/v4" + "v2ray.com/core/v4/app/dispatcher" + "v2ray.com/core/v4/app/proxyman" + "v2ray.com/core/v4/common" + "v2ray.com/core/v4/common/net" + "v2ray.com/core/v4/common/protocol" + "v2ray.com/core/v4/common/serial" + "v2ray.com/core/v4/common/uuid" + "v2ray.com/core/v4/features/dns" + "v2ray.com/core/v4/features/dns/localdns" + _ "v2ray.com/core/v4/main/distro/all" + "v2ray.com/core/v4/proxy/dokodemo" + "v2ray.com/core/v4/proxy/vmess" + "v2ray.com/core/v4/proxy/vmess/outbound" + "v2ray.com/core/v4/testing/servers/tcp" ) func TestV2RayDependency(t *testing.T) {