Commit 34a6d8ea authored by Ivan Vandot's avatar Ivan Vandot Committed by GitHub

change default ports (#961)

parent 2b491c9f
...@@ -21,7 +21,7 @@ RUN apt-get update && apt-get install -y \ ...@@ -21,7 +21,7 @@ RUN apt-get update && apt-get install -y \
COPY --from=build /src/dist/bee /usr/local/bin/bee COPY --from=build /src/dist/bee /usr/local/bin/bee
EXPOSE 6060 7070 8080 EXPOSE 1633 1634 1635
USER bee USER bee
WORKDIR /home/bee WORKDIR /home/bee
......
...@@ -253,7 +253,7 @@ If --output-dir is set, the retrieved file will be written to the speficied dire ...@@ -253,7 +253,7 @@ If --output-dir is set, the retrieved file will be written to the speficied dire
c.Flags().BoolVarP(&outFileForce, "force", "f", false, "overwrite existing output file") c.Flags().BoolVarP(&outFileForce, "force", "f", false, "overwrite existing output file")
c.Flags().StringVarP(&outDir, "output-dir", "d", "", "save directory") c.Flags().StringVarP(&outDir, "output-dir", "d", "", "save directory")
c.Flags().StringVar(&host, "host", "127.0.0.1", "api host") c.Flags().StringVar(&host, "host", "127.0.0.1", "api host")
c.Flags().IntVar(&port, "port", 8080, "api port") c.Flags().IntVar(&port, "port", 1633, "api port")
c.Flags().BoolVar(&ssl, "ssl", false, "use ssl") c.Flags().BoolVar(&ssl, "ssl", false, "use ssl")
c.Flags().BoolVarP(&retrieve, "retrieve", "r", false, "retrieve file from referenced entry") c.Flags().BoolVarP(&retrieve, "retrieve", "r", false, "retrieve file from referenced entry")
c.Flags().BoolVar(&useHttp, "http", false, "save entry to bee http api") c.Flags().BoolVar(&useHttp, "http", false, "save entry to bee http api")
......
...@@ -104,7 +104,7 @@ Will output retrieved data to stdout.`, ...@@ -104,7 +104,7 @@ Will output retrieved data to stdout.`,
c.Flags().StringVarP(&outFilePath, "output-file", "o", "", "file to write output to") c.Flags().StringVarP(&outFilePath, "output-file", "o", "", "file to write output to")
c.Flags().BoolVarP(&outFileForce, "force", "f", false, "overwrite existing output file") c.Flags().BoolVarP(&outFileForce, "force", "f", false, "overwrite existing output file")
c.Flags().StringVar(&host, "host", "127.0.0.1", "api host") c.Flags().StringVar(&host, "host", "127.0.0.1", "api host")
c.Flags().IntVar(&port, "port", 8080, "api port") c.Flags().IntVar(&port, "port", 1633, "api port")
c.Flags().BoolVar(&ssl, "ssl", false, "use ssl") c.Flags().BoolVar(&ssl, "ssl", false, "use ssl")
c.Flags().StringVarP(&indir, "input-dir", "i", "", "retrieve chunks from directory") c.Flags().StringVarP(&indir, "input-dir", "i", "", "retrieve chunks from directory")
c.Flags().StringVar(&verbosity, "info", "0", "log verbosity level 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=trace") c.Flags().StringVar(&verbosity, "info", "0", "log verbosity level 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=trace")
......
...@@ -128,7 +128,7 @@ Chunks are saved in individual files, and the file names will be the hex address ...@@ -128,7 +128,7 @@ Chunks are saved in individual files, and the file names will be the hex address
c.Flags().StringVarP(&outdir, "output-dir", "d", "", "saves chunks to given directory") c.Flags().StringVarP(&outdir, "output-dir", "d", "", "saves chunks to given directory")
c.Flags().Int64VarP(&inputLength, "count", "c", 0, "read at most this many bytes") c.Flags().Int64VarP(&inputLength, "count", "c", 0, "read at most this many bytes")
c.Flags().StringVar(&host, "host", "127.0.0.1", "api host") c.Flags().StringVar(&host, "host", "127.0.0.1", "api host")
c.Flags().IntVar(&port, "port", 8080, "api port") c.Flags().IntVar(&port, "port", 1633, "api port")
c.Flags().BoolVar(&ssl, "ssl", false, "use ssl") c.Flags().BoolVar(&ssl, "ssl", false, "use ssl")
c.Flags().BoolVar(&useHttp, "http", false, "save chunks to bee http api") c.Flags().BoolVar(&useHttp, "http", false, "save chunks to bee http api")
c.Flags().StringVar(&verbosity, "info", "0", "log verbosity level 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=trace") c.Flags().StringVar(&verbosity, "info", "0", "log verbosity level 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=trace")
......
...@@ -176,14 +176,14 @@ func (c *command) setAllFlags(cmd *cobra.Command) { ...@@ -176,14 +176,14 @@ func (c *command) setAllFlags(cmd *cobra.Command) {
cmd.Flags().Uint64(optionNameDBCapacity, 5000000, fmt.Sprintf("db capacity in chunks, multiply by %d to get approximate capacity in bytes", swarm.ChunkSize)) cmd.Flags().Uint64(optionNameDBCapacity, 5000000, fmt.Sprintf("db capacity in chunks, multiply by %d to get approximate capacity in bytes", swarm.ChunkSize))
cmd.Flags().String(optionNamePassword, "", "password for decrypting keys") cmd.Flags().String(optionNamePassword, "", "password for decrypting keys")
cmd.Flags().String(optionNamePasswordFile, "", "path to a file that contains password for decrypting keys") cmd.Flags().String(optionNamePasswordFile, "", "path to a file that contains password for decrypting keys")
cmd.Flags().String(optionNameAPIAddr, ":8080", "HTTP API listen address") cmd.Flags().String(optionNameAPIAddr, ":1633", "HTTP API listen address")
cmd.Flags().String(optionNameP2PAddr, ":7070", "P2P listen address") cmd.Flags().String(optionNameP2PAddr, ":1634", "P2P listen address")
cmd.Flags().String(optionNameNATAddr, "", "NAT exposed address") cmd.Flags().String(optionNameNATAddr, "", "NAT exposed address")
cmd.Flags().Bool(optionNameP2PWSEnable, false, "enable P2P WebSocket transport") cmd.Flags().Bool(optionNameP2PWSEnable, false, "enable P2P WebSocket transport")
cmd.Flags().Bool(optionNameP2PQUICEnable, false, "enable P2P QUIC transport") cmd.Flags().Bool(optionNameP2PQUICEnable, false, "enable P2P QUIC transport")
cmd.Flags().StringSlice(optionNameBootnodes, []string{"/dnsaddr/bootnode.ethswarm.org"}, "initial nodes to connect to") cmd.Flags().StringSlice(optionNameBootnodes, []string{"/dnsaddr/bootnode.ethswarm.org"}, "initial nodes to connect to")
cmd.Flags().Bool(optionNameDebugAPIEnable, false, "enable debug HTTP API") cmd.Flags().Bool(optionNameDebugAPIEnable, false, "enable debug HTTP API")
cmd.Flags().String(optionNameDebugAPIAddr, ":6060", "debug HTTP API listen address") cmd.Flags().String(optionNameDebugAPIAddr, ":1635", "debug HTTP API listen address")
cmd.Flags().Uint64(optionNameNetworkID, 1, "ID of the Swarm network") cmd.Flags().Uint64(optionNameNetworkID, 1, "ID of the Swarm network")
cmd.Flags().StringSlice(optionCORSAllowedOrigins, []string{}, "origins with CORS headers enabled") cmd.Flags().StringSlice(optionCORSAllowedOrigins, []string{}, "origins with CORS headers enabled")
cmd.Flags().Bool(optionNameStandalone, false, "whether we want the node to start with no listen addresses for p2p") cmd.Flags().Bool(optionNameStandalone, false, "whether we want the node to start with no listen addresses for p2p")
......
...@@ -19,7 +19,7 @@ servers: ...@@ -19,7 +19,7 @@ servers:
default: 'localhost' default: 'localhost'
description: Base address of the local bee node main API description: Base address of the local bee node main API
port: port:
default: 8080 default: 1633
description: Service port provided in bee node config description: Service port provided in bee node config
- url: 'http://{apiRoot}:{port}' - url: 'http://{apiRoot}:{port}'
...@@ -28,7 +28,7 @@ servers: ...@@ -28,7 +28,7 @@ servers:
default: 'localhost' default: 'localhost'
description: Base address of the local bee node main API description: Base address of the local bee node main API
port: port:
default: 8080 default: 1633
description: Service port provided in bee node config description: Service port provided in bee node config
paths: paths:
......
...@@ -189,7 +189,7 @@ components: ...@@ -189,7 +189,7 @@ components:
P2PUnderlay: P2PUnderlay:
type: string type: string
example: "/ip4/127.0.0.1/tcp/7070/p2p/16Uiu2HAmTm17toLDaPYzRyjKn27iCB76yjKnJ5DjQXneFmifFvaX" example: "/ip4/127.0.0.1/tcp/1634/p2p/16Uiu2HAmTm17toLDaPYzRyjKn27iCB76yjKnJ5DjQXneFmifFvaX"
Peers: Peers:
type: object type: object
......
...@@ -19,7 +19,7 @@ servers: ...@@ -19,7 +19,7 @@ servers:
default: 'localhost' default: 'localhost'
description: Base address of the local bee node debug API description: Base address of the local bee node debug API
port: port:
default: 6060 default: 1635
description: Service port provided in bee node config description: Service port provided in bee node config
paths: paths:
......
...@@ -14,7 +14,7 @@ import ( ...@@ -14,7 +14,7 @@ import (
) )
func TestBzzAddress(t *testing.T) { func TestBzzAddress(t *testing.T) {
node1ma, err := ma.NewMultiaddr("/ip4/127.0.0.1/tcp/7070/p2p/16Uiu2HAkx8ULY8cTXhdVAcMmLcH9AsTKz6uBQ7DPLKRjMLgBVYkA") node1ma, err := ma.NewMultiaddr("/ip4/127.0.0.1/tcp/1634/p2p/16Uiu2HAkx8ULY8cTXhdVAcMmLcH9AsTKz6uBQ7DPLKRjMLgBVYkA")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
......
...@@ -22,8 +22,8 @@ import ( ...@@ -22,8 +22,8 @@ import (
) )
func TestConnect(t *testing.T) { func TestConnect(t *testing.T) {
underlay := "/ip4/127.0.0.1/tcp/7070/p2p/16Uiu2HAkx8ULY8cTXhdVAcMmLcH9AsTKz6uBQ7DPLKRjMLgBVYkS" underlay := "/ip4/127.0.0.1/tcp/1634/p2p/16Uiu2HAkx8ULY8cTXhdVAcMmLcH9AsTKz6uBQ7DPLKRjMLgBVYkS"
errorUnderlay := "/ip4/127.0.0.1/tcp/7070/p2p/16Uiu2HAkw88cjH2orYrB6fDui4eUNdmgkwnDM8W681UbfsPgM9QY" errorUnderlay := "/ip4/127.0.0.1/tcp/1634/p2p/16Uiu2HAkw88cjH2orYrB6fDui4eUNdmgkwnDM8W681UbfsPgM9QY"
testErr := errors.New("test error") testErr := errors.New("test error")
privateKey, err := crypto.GenerateSecp256k1Key() privateKey, err := crypto.GenerateSecp256k1Key()
......
...@@ -782,7 +782,7 @@ func removeOne(k *kademlia.Kad, peer swarm.Address) { ...@@ -782,7 +782,7 @@ func removeOne(k *kademlia.Kad, peer swarm.Address) {
k.Disconnected(p2p.Peer{Address: peer}) k.Disconnected(p2p.Peer{Address: peer})
} }
const underlayBase = "/ip4/127.0.0.1/tcp/7070/dns/" const underlayBase = "/ip4/127.0.0.1/tcp/1634/dns/"
func connectOne(t *testing.T, signer beeCrypto.Signer, k *kademlia.Kad, ab addressbook.Putter, peer swarm.Address) { func connectOne(t *testing.T, signer beeCrypto.Signer, k *kademlia.Kad, ab addressbook.Putter, peer swarm.Address) {
t.Helper() t.Helper()
......
...@@ -32,11 +32,11 @@ func TestHandshake(t *testing.T) { ...@@ -32,11 +32,11 @@ func TestHandshake(t *testing.T) {
logger := logging.New(ioutil.Discard, 0) logger := logging.New(ioutil.Discard, 0)
networkID := uint64(3) networkID := uint64(3)
node1ma, err := ma.NewMultiaddr("/ip4/127.0.0.1/tcp/7070/p2p/16Uiu2HAkx8ULY8cTXhdVAcMmLcH9AsTKz6uBQ7DPLKRjMLgBVYkA") node1ma, err := ma.NewMultiaddr("/ip4/127.0.0.1/tcp/1634/p2p/16Uiu2HAkx8ULY8cTXhdVAcMmLcH9AsTKz6uBQ7DPLKRjMLgBVYkA")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
node2ma, err := ma.NewMultiaddr("/ip4/127.0.0.1/tcp/7070/p2p/16Uiu2HAkx8ULY8cTXhdVAcMmLcH9AsTKz6uBQ7DPLKRjMLgBVYkS") node2ma, err := ma.NewMultiaddr("/ip4/127.0.0.1/tcp/1634/p2p/16Uiu2HAkx8ULY8cTXhdVAcMmLcH9AsTKz6uBQ7DPLKRjMLgBVYkS")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
......
...@@ -28,7 +28,7 @@ import ( ...@@ -28,7 +28,7 @@ import (
func TestAddPeers(t *testing.T) { func TestAddPeers(t *testing.T) {
logger := logging.New(ioutil.Discard, 0) logger := logging.New(ioutil.Discard, 0)
underlay, err := ma.NewMultiaddr("/ip4/127.0.0.1/tcp/7070/p2p/16Uiu2HAkx8ULY8cTXhdVAcMmLcH9AsTKz6uBQ7DPLKRjMLgBVYkS") underlay, err := ma.NewMultiaddr("/ip4/127.0.0.1/tcp/1634/p2p/16Uiu2HAkx8ULY8cTXhdVAcMmLcH9AsTKz6uBQ7DPLKRjMLgBVYkS")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment