proxyauth

command module
v0.0.0-...-72318bf Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

proxyauth

Web認証のプロキシを通す。

Web認証のURLを書き換えます。(httpサイトにリダイレクトするために neverssl.com を指定しています。なくてもいいかも)

page.Navigate("https://xxx.xxx.xxx.xxx:99999/proxy?foo=bar&hogehoge=http://neverssl.com")

ユーザIDを書き換えます。

page.FindByID("user").Fill("xxxxxxxx")

パスワードを書き換えます。

page.FirstByName("passwd").Fill("xxxxxxxxxxxxxxxx")

パスワードは暗号化したものを外部から渡されて、復号してセットするほうがいいと思いますけど、とりあえず・・・
パスワード変えたり、ユーザID変えたりすることも当然ありますからね。

build

MacでLinux用のクロスコンパイルを行うために、以下のようにしています。

$ mkdir linux-amd64
$ GOOS=linux GOARCH=amd64 go build -o linux-amd64/proxyauth ./proxyauth.go

run

ChromeDriverを入れておく必要があります。

Mac

$ brew cask install chromedriver

Linux

$ sudo apt install chromium-chromedriver

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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