Darien Raymond hace 8 años
padre
commit
e7aaba0c30
Se han modificado 2 ficheros con 3 adiciones y 3 borrados
  1. 1 1
      app/proxyman/inbound/worker.go
  2. 2 2
      proxy/handler_cache.go

+ 1 - 1
app/proxyman/inbound/worker.go

@@ -79,7 +79,7 @@ func (w *tcpWorker) Start() error {
 	conns := make(chan internet.Connection, 16)
 	hub, err := internet.ListenTCP(ctx, w.address, w.port, conns)
 	if err != nil {
-		return err
+		return newError("failed to listen TCP on ", w.port).Base(err)
 	}
 	go w.handleConnections(conns)
 	w.hub = hub

+ 2 - 2
proxy/handler_cache.go

@@ -9,7 +9,7 @@ import (
 func CreateInboundHandler(ctx context.Context, config interface{}) (Inbound, error) {
 	handler, err := common.CreateObject(ctx, config)
 	if err != nil {
-		return nil, err
+		return nil, newError("failed to create inbound handler").Base(err)
 	}
 	switch h := handler.(type) {
 	case Inbound:
@@ -22,7 +22,7 @@ func CreateInboundHandler(ctx context.Context, config interface{}) (Inbound, err
 func CreateOutboundHandler(ctx context.Context, config interface{}) (Outbound, error) {
 	handler, err := common.CreateObject(ctx, config)
 	if err != nil {
-		return nil, err
+		return nil, newError("failed to create outbound handler").Base(err)
 	}
 	switch h := handler.(type) {
 	case Outbound: