mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-04-19 12:09:10 -04:00
move session based info into session package
This commit is contained in:
@@ -76,7 +76,11 @@ func isValidAddress(addr *net.IPOrDomain) bool {
|
||||
|
||||
// Process implements proxy.Outbound.
|
||||
func (h *Handler) Process(ctx context.Context, link *core.Link, dialer proxy.Dialer) error {
|
||||
destination, _ := proxy.TargetFromContext(ctx)
|
||||
outbound := session.OutboundFromContext(ctx)
|
||||
if outbound == nil || !outbound.Target.IsValid() {
|
||||
return newError("target not specified.")
|
||||
}
|
||||
destination := outbound.Target
|
||||
if h.config.DestinationOverride != nil {
|
||||
server := h.config.DestinationOverride.Server
|
||||
if isValidAddress(server.Address) {
|
||||
|
||||
Reference in New Issue
Block a user