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
Static port for captures #16
Comments
@auras have you tried using bridged interface for the docker machine? |
Yeah, I know I can do that. But I need something predictable that can be
shared with a whole team.
…On 18 Nov 2017 20:12, "Eliezer Croitoru" ***@***.***> wrote:
@auras <https://github.com/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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAUUHd_ITl6D7AIOEtSmb9QOU4l9ddiPks5s3ywpgaJpZM4QiQrp>
.
|
@auras So what do you need? |
Both. To expose the port I would need to know it in advance.
…On 18 Nov 2017 21:34, "Eliezer Croitoru" ***@***.***> wrote:
@auras <https://github.com/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?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAUUHV_OPTGo_qZGMhN200c0x4B635k5ks5s3z9agaJpZM4QiQrp>
.
|
@auras The internal would be setup by you and only you as the docker maintainer. |
I've never used go but in service.go line 330, doesn't that mean it's
looking for a random open port?
// Looking for a port to listen to.
ln, err := net.Listen("tcp", serviceBindHost+":0")
…On 18 Nov 2017 23:31, "Eliezer Croitoru" ***@***.***> wrote:
@auras <https://github.com/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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAUUHZH-67qRbG265gTDTqZN71nW0F7pks5s31ragaJpZM4QiQrp>
.
|
@auras I have not seen that. |
@auras , yes you are right, It will be a random port (https://golang.org/pkg/net/#Listen, @elico , That flag is for the port the proxy should bind to. I am not sure what @auras 's use case is. The proxy default port is mentioned here Line 41 in 71d50a7
p flag.
|
I get that and I know how I would go about to make it static. I wouldn't
have created this issue if I worked with go before. But I didn't and
couldn't manage to download the dependencies and build the project.
…On 19 Nov 2017 13:41, "Pulkit Sharma" ***@***.***> wrote:
@auras <https://github.com/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 set it 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 <https://github.com/elico> , That flag is for the port the proxy
should bind to. I am not sure what @auras <https://github.com/auras> 's
use case is. service.go mentioned by @auras <https://github.com/auras> is
concerned with other services i.e. things other than the actual proxy.
The proxy default port is mentioned here https://github.com/malfunkt/
hyperfox/blob/71d50a7d7325b19cba86bf2112370c8ea44bcbaf/main.go#L41 and as
I mentioned above, you can change it using the p flag.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAUUHXzU49tkWwkGpq-BSQWjaEBAdIaTks5s4CIAgaJpZM4QiQrp>
.
|
Cool, I'll create a PR later. |
Thank you
…On 19 Nov 2017 13:51, "Pulkit Sharma" ***@***.***> wrote:
Cool, I'll create a PR later.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAUUHcctI_PlOc6jQed-QONk4iFbvrNaks5s4CRlgaJpZM4QiQrp>
.
|
@auras What OS are you using? |
I'm building on a ubuntu 16.04 docker container |
@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
|
Which version of go did you use?
…On 19 Nov 2017 19:55, "Eliezer Croitoru" ***@***.***> wrote:
@auras <https://github.com/auras> @pulkitsharma07
<https://github.com/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
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAUUHaW6CRy4WBwDEil63Oww9hBZ-xuJks5s4HmdgaJpZM4QiQrp>
.
|
I want to run hyperfox inside a docker container. But I cannot configure docker to forward a port without knowing it beforehand and for that I would need to be able to configure the port to view the captures.
The text was updated successfully, but these errors were encountered: