Proxy support

This commit is contained in:
Musab Gültekin
2021-09-24 16:15:20 +03:00
parent 242b025c9a
commit 97ecb7f118
8 changed files with 115 additions and 1 deletions

View File

@@ -6,6 +6,8 @@ import (
"github.com/geziyor/geziyor/export"
"github.com/geziyor/geziyor/metrics"
"github.com/geziyor/geziyor/middleware"
"net/http"
"net/url"
"time"
)
@@ -69,6 +71,9 @@ type Options struct {
// If true, HTML parsing is disabled to improve performance.
ParseHTMLDisabled bool
// ProxyFunc setting proxy for each request
ProxyFunc func(*http.Request) (*url.URL, error)
// Request delays
RequestDelay time.Duration