GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - antflux/browsermobproxy-go: browsermobproxy for go

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
.idea
.idea
 
 
vendor
vendor
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
client.go
client.go
 
 
server.go
server.go
 
 

Repository files navigation

browsermobproxy-go

browsermobproxy for go

How too use it?

Create new server?

    //the path browsermob-proxy install
    Server =browsermobproxy.NewServer("/Users//bin/browsermob-proxy")
    Server.Start()

create proxy

proxy :=Server.CreateProxy(browsermobproxy.Params{"trustAllServers":"true"})

chromeCaps := chrome.Capabilities{
		Prefs:            imgCaps,
		Path:             "",
		Args: []string{
			//"--headless",
			"--start-maximized",
			"--window-size=1200x600",
			"--no-sandbox",
			"--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36",
			"--disable-gpu",
			"--disable-impl-side-painting",
			"--disable-gpu-sandbox",
			"--disable-accelerated-2d-canvas",
			"--disable-accelerated-jpeg-decoding",
			"--test-type=ui",
		},
	}

add it to chrome

var caps selenium.Capabilities
chromeCaps.Args = append(spider.ChromeCaps.Args, fmt.Sprintf("--proxy-server=%s",p.Proxy))
caps.AddChrome(chromeCaps)
wd, err := selenium.NewRemote(caps, fmt.Sprintf("http://localhost:%d/wd/hub", 9515))

use newhar

options :=make(map[string]string)
	options["captureHeaders"] = "true"
	options["captureContent"] = "true"
	proxy.NewHar("loginform",options)
	wd.get("url")
	result :=proxy.Har()

v1.0 you can use 1、proxy 2、Har 3、NewHar 4、Blacklist 5、ResponseInterceptor 6、RequestInterceptor

About

browsermobproxy for go

Topics

browsermobrowsermob-proxygo-proxylightbodylightbody-go

Resources

Readme
MIT license
Activity

Stars

4 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.