Add error page when accept header is text/html

This commit is contained in:
joncrangle
2023-12-13 00:04:19 -05:00
parent c2d6a2c461
commit ad415bee8c
5 changed files with 278 additions and 4 deletions

View File

@@ -3,14 +3,15 @@ package proxychain
import (
"errors"
"fmt"
http "github.com/bogdanfinn/fhttp"
tls_client "github.com/bogdanfinn/tls-client"
profiles "github.com/bogdanfinn/tls-client/profiles"
"io"
"log"
"net/url"
"strings"
http "github.com/bogdanfinn/fhttp"
tls_client "github.com/bogdanfinn/tls-client"
profiles "github.com/bogdanfinn/tls-client/profiles"
"github.com/gofiber/fiber/v2"
)
@@ -398,7 +399,7 @@ func (chain *ProxyChain) abort(err error) error {
} else {
e = fmt.Errorf("ProxyChain error: '%s'", err.Error())
}
chain.Context.SendString(e.Error())
// chain.Context.SendString(e.Error()) // <- RenderErrorPage middleware to render error
log.Println(e.Error())
return e
}