Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runners are running behind proxy, so we need to set http proxy, https proxy and no proxy variables provided by our organization so where can we set hoverfly proxy variables #1106

Open
jakkshay opened this issue Dec 8, 2023 · 1 comment

Comments

@jakkshay
Copy link

jakkshay commented Dec 8, 2023

Description of the bug

runners are running behind proxy, so we need to set http proxy, https proxy and no proxy variables provided by our organization so where can we set hoverfly proxy variables

Steps to reproduce the issue

GitLab Job to run script: We are using hoverfly binary files
chmod 777 hoverctl
chmod 777 hoverfly
./hoverctl version
./hoverctl config
./hoverctl start --admin-port 9093 --proxy-port 9092 --disable-tls --cors -v || ls
./hoverctl logs
./hoverctl mode capture
export HTTP_PROXY="http://localhost:9092"
export HTTPS_PROXY="http://localhost:9092"
no_proxy: $CODE_NO_PROXY
npx cypress run --spec path/to/specfile
./hoverctl logs
./hoverctl export simualtion.json

We are setting proxy to our docker runner like this:

.job_template: &artifacts_cache
artifacts:
expire_in: 1 week
when: always
paths:
- test_report
- simulation.json
allow_failure: true
tags:

  • DOCKER
    retry:
    max: 2
    when: runner_system_failure
    variables:
    HTTP_PROXY: $CODE_PROXY
    HTTPS_PROXY: $CODE_PROXY
    NO_PROXY: $CODE_NO_PROXY
    http_proxy: "$CODE_PROXY"
    https_proxy: "$CODE_PROXY"
    no_proxy: $CODE_NO_PROXY

Observed result

We are unable to capture the hoverfly traffic
Hoverfly error messages seen (If none, say none)

Hoverfly is now running
+------------+------+
| admin-port | 9093 |
| proxy-port | 9092 |
+------------+------+
INFO[2023-12-06T12:24:39Z] Default proxy port has been overwritten       port=9092
INFO[2023-12-06T12:24:39Z] Default admin port has been overwritten       port=9093
INFO[2023-12-06T12:24:39Z] CORS has been enabled                        
INFO[2023-12-06T12:24:39Z] TLS certificate verification has been disabled 
INFO[2023-12-06T12:24:39Z] Using memory backend                         
INFO[2023-12-06T12:24:39Z] Proxy prepared...                             Destination=. Mode=simulate ProxyPort=9092
INFO[2023-12-06T12:24:39Z] current proxy configuration                   destination=. mode=simulate port=9092
INFO[2023-12-06T12:24:39Z] serving proxy                                
INFO[2023-12-06T12:24:39Z] Admin interface is starting...                AdminPort=9093
Hoverfly has been set to capture mode 

 ✔  All specs passed!                        01:02        2        2        -        -        -  
Done in 71.67s.
INFO[2023-12-06T12:24:39Z] Default proxy port has been overwritten       port=9092
INFO[2023-12-06T12:24:39Z] Default admin port has been overwritten       port=9093
INFO[2023-12-06T12:24:39Z] CORS has been enabled                        
INFO[2023-12-06T12:24:39Z] TLS certificate verification has been disabled 
INFO[2023-12-06T12:24:39Z] Using memory backend                         
INFO[2023-12-06T12:24:39Z] Proxy prepared...                             Destination=. Mode=simulate ProxyPort=9092
INFO[2023-12-06T12:24:39Z] current proxy configuration                   destination=. mode=simulate port=9092
INFO[2023-12-06T12:24:39Z] serving proxy                                
INFO[2023-12-06T12:24:39Z] Admin interface is starting...                AdminPort=9093
INFO[2023-12-06T12:24:40Z] Mode has been changed                         mode=capture
Successfully exported simulation to simulation.json

Our simulation file is unable to capture the traffic and simulation file is looking like below:
{
	"data": {
		"pairs": [],
		"globalActions": {
			"delays": [],
			"delaysLogNormal": []
		}
	},
	"meta": {
		"schemaVersion": "v5.2",
		"hoverflyVersion": "v1.6.0",
		"timeExported": "2023-12-06T12:25:30Z"
	}
}

If possible, add screenshots to help explain your problem

Expected result

Hoverfly traffic should get captured

Additional relevant information

  1. Hoverfly version: v1.6.0
  2. Anything that might help us to diagnose the problem
@vishallanke
Copy link

Any update here ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants