Comments (16)
@auras have you tried using bridged interface for the docker machine?
This way you would be able to access the docker directly without any proxy\forwarding.
from hyperfox.
from hyperfox.
@auras So what do you need?
Since it's a docker the inside port will always be the same....
Do you need to register in some place a docker instance external(ie host) port?
Do you need to customize it or publish it?
from hyperfox.
from hyperfox.
@auras The internal would be setup by you and only you as the docker maintainer.
There are couple variables which you can use to do that but I am still not sure what and how.
The settings of hyperfox inside the docker container can be set statically for example 18080.
Then you can play with each instance when you spin it up to set the desired external port.
There shouldn't be ever a situation that you spin a docker and you give it "auto internal port choice".. it's always based on some settings.. so only left the external.
from hyperfox.
from hyperfox.
@auras I have not seen that.
Well the code needs some changing.
There is a flag: defaultPort
But if it's not used then it's either and error or maybe I am not understanding the code right.
@pulkitsharma07 @xiam , Can you clear it out?
Should the flag be used? Is it used?
from hyperfox.
@auras , yes you are right, It will be a random port (https://golang.org/pkg/net/#Listen, If the port in the address parameter is empty or "0", as in "127.0.0.1:" or "[::1]:0", a port number is automatically chosen
). There is no functionality (it seems) to have it listen on a specific port. I am not familiar with the code base, So, I guess you'll need to give a PR to have this functionality. If you need it at this moment, you can always change that line (or add a flag) to have it listen to a specific port. Another workaround, is to close all other ports in docker container (So, that we can make that port somewhat deterministic), I am not sure how to achieve this, Just my two cents here.
@elico , That flag is for the port the proxy should bind to. I am not sure what @auras 's use case is. service.go
mentioned by @auras is concerned with other services i.e. things other than the actual proxy.
The proxy default port is mentioned here
Line 41 in 71d50a7
p
flag.from hyperfox.
from hyperfox.
Cool, I'll create a PR later.
from hyperfox.
from hyperfox.
@auras What OS are you using?
from hyperfox.
I'm building on a ubuntu 16.04 docker container
from hyperfox.
@auras @pulkitsharma07 I tried to build it for both Linux and FreeBSD but I only managed to build hyperfox for linux 64 bit because of something with sqlite
github.com/mattn/go-sqlite3
../../go/src/github.com/mattn/go-sqlite3/sqlite3_go18.go:18:10: undefined: SQLiteConn
from hyperfox.
from hyperfox.
@auras https://github.com/malfunkt/hyperfox/tree/v1.9.8
from hyperfox.
Related Issues (20)
- Windows support. HOT 5
- panic serving 127.0.0.1:XXX: Unknown condition type uint HOT 1
- Some custom middlewares
- Read overflow error by HTTPS server HOT 2
- Database fails to load in the browser HOT 2
- can't start if i use -k -c HOT 1
- hyperfox.org is offline HOT 4
- Choose an storage backend that does not depend on CGO HOT 2
- Problem with https proxy HOT 1
- Cannot get latest version: module contains a go.mod file, so module path should be github.com/malfunkt/hyperfox/v2 HOT 2
- Getting TLS Failure HOT 1
- Capture HTTP and HTTPS
- io.Copy "context canceled"
- `dsniff` link on https://hyperfox.org/capturing-https-traffic points to the sample CA certificate HOT 1
- snags
- undefined: tls.ClientHelloInfo HOT 3
- hi,may i ask a question about flow control (single client connect to server ) HOT 1
- TLS oversized record error HOT 6
- How to work it with shadowsocks?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hyperfox.