Giter Site home page Giter Site logo

Static port for captures about hyperfox HOT 16 OPEN

malfunkt avatar malfunkt commented on July 2, 2024
Static port for captures

from hyperfox.

Comments (16)

elico avatar elico commented on July 2, 2024

@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.

auras avatar auras commented on July 2, 2024

from hyperfox.

elico avatar elico commented on July 2, 2024

@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.

auras avatar auras commented on July 2, 2024

from hyperfox.

elico avatar elico commented on July 2, 2024

@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.

auras avatar auras commented on July 2, 2024

from hyperfox.

elico avatar elico commented on July 2, 2024

@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.

pulkitsharma07 avatar pulkitsharma07 commented on July 2, 2024

@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

defaultPort = uint(1080)
you can change it using the p flag.

from hyperfox.

auras avatar auras commented on July 2, 2024

from hyperfox.

pulkitsharma07 avatar pulkitsharma07 commented on July 2, 2024

Cool, I'll create a PR later.

from hyperfox.

auras avatar auras commented on July 2, 2024

from hyperfox.

elico avatar elico commented on July 2, 2024

@auras What OS are you using?

from hyperfox.

auras avatar auras commented on July 2, 2024

I'm building on a ubuntu 16.04 docker container

from hyperfox.

elico avatar elico commented on July 2, 2024

@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.

auras avatar auras commented on July 2, 2024

from hyperfox.

elico avatar elico commented on July 2, 2024

@auras https://github.com/malfunkt/hyperfox/tree/v1.9.8

from hyperfox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.