proxy

package
v0.0.36 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Copyright (c) 2018 AltosCode, LLC

This software is released under the MIT License. https://opensource.org/licenses/MIT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDownloader

func NewDownloader(proxyServer string, config *Config) (download.Downloader, error)

Types

type Config added in v0.0.26

type Config struct {
	TLSHandshakeTimeout int
	DisableHTTPS        bool
	Timeout             int
}

Config for proxy

func NewDefaultConfig added in v0.0.26

func NewDefaultConfig() *Config

NewDefaultConfig creates a new config

type Downloader

type Downloader struct {
	// contains filtered or unexported fields
}

func NewProxyDownloader added in v0.0.21

func NewProxyDownloader(proxyServer string, config *Config) (*Downloader, error)

func (*Downloader) Close added in v0.0.19

func (downloader *Downloader) Close() error

func (*Downloader) Get

func (downloader *Downloader) Get(url string, fnModifyRequest func(req *http.Request) error) ([]byte, int, error)

Get retrieves the url content based on the given user agent

func (*Downloader) GetURL added in v0.0.26

func (downloader *Downloader) GetURL(server string) (*url.URL, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL