vechain / thor

A general purpose blockchain highly compatible with Ethereum's ecosystem
GNU Lesser General Public License v3.0
799 stars 246 forks source link

OpenAPI #25

Closed LMEToken closed 6 years ago

LMEToken commented 6 years ago

OS Version: Linux Linux

Windows/Linux/OSX

Commit hash : (if develop)

[root@host thor]# bin/thor -h NAME: Thor - Node of VeChain Thor Network

USAGE: [global options] command [command options] [arguments...]

VERSION: 1.0.0-87ee8ab-dev

COMMANDS: solo client runs in solo mode for test & dev master-key import and export master key help, h Shows a list of commands or help for one command

GLOBAL OPTIONS: --network value the network to join (test) --data-dir value directory for block-chain databases (default: "/root/.org.vechain.thor") --beneficiary value address for block rewards --api-addr value API service listening address (default: "localhost:8669") --api-cors value comma separated list of domains from which to accept cross origin requests to API --verbosity value log verbosity (0-9) (default: 3) --max-peers value maximum number of P2P network peers (P2P network disabled if set to 0) (default: 25) --p2p-port value P2P network listening port (default: 11235) --nat value port mapping mechanism (any|none|upnp|pmp|extip:) (default: "none") --help, -h show help --version, -v print the version

COPYRIGHT: 2018 VeChain Foundation https://vechain.org/ [root@host thor]# curl -v "http://localhost:8669"

Expected behavior

Tell us what should happen.

Actual behavior

Tell us what happens instead. Provide a log message if relevant.

Steps to reproduce the behavior

LMEToken commented 6 years ago

1.The following content appears in the Intranet connection

curl "http://localhost:8669"

Temporary Redirect.

2.The external network cannot connect. Below is the log of my test server [root@host thor]# curl -v http://95.169.6.156:8669/

qianbin commented 6 years ago

access to http://127.0.0.1:8669/ will redirect you to the portal page of SwaggerUI. you can open the URL in your web browser.

It's strongly recommended not to expose API for public access.

rogojs commented 6 years ago

I don't see a reason to expose the API unless you are using a cloud provider for your VM and then you should be whitelisting your IP during development. Can we close this issue?

LMEToken commented 6 years ago

I see. I thought the nodes had independent API capabilities