Commit Graph

51 Commits

Author SHA1 Message Date
Felix Lange e9b5e22ad1 rpc: limit chunked requests (#16343) 2018-03-26 14:46:37 +03:00
Péter Szilágyi 555f42cfd8
rpc: enforce the 128KB request limits on websockets too 2018-03-13 13:55:26 +02:00
Martin Holst Swende 6c6247a690
node, rpc: fix linter issues 2018-02-12 14:12:55 +01:00
Martin Holst Swende 589b603a9b rpc: dns rebind protection (#15962)
* cmd,node,rpc: add allowedHosts to prevent dns rebinding attacks

* p2p,node: Fix bug with dumpconfig introduced in r54aeb8e4c0bb9f0e7a6c67258af67df3b266af3d

* rpc: add wildcard support for rpcallowedhosts + go fmt

* cmd/geth, cmd/utils, node, rpc: ignore direct ip(v4/6) addresses in rpc virtual hostnames check

* http, rpc, utils: make vhosts into map, address review concerns

* node: change log messages to use geth standard (not sprintf)

* rpc: fix spelling
2018-02-12 14:52:07 +02:00
Steven Roose 952482d5e4 rpc: Support specifying HTTP client in RPC dialing (#15836)
* rpc: Support specifying HTTP client in RPC dialing

Adds a minimal interface that captures http.Client and adds a new method
rpc.DialHTTPClient that takes a client using that interface. The existing
rpc.DialHTTP method is then alternatively implemented by using the new
rpc.DialHTTPClient method provided with a standard *http.Client.

* rpc: fix minor doc typos
2018-01-24 10:59:15 +02:00
Sorin Neacsu 5369a5c54d rpc: allow OPTIONS requests without Content-Type (#15759)
Fixes #15740
2017-12-28 14:15:33 +01:00
Vitaly V f258a21a63 rpc: use method constants instead of literal strings (#15652) 2017-12-12 19:12:32 +01:00
Péter Szilágyi 3c6b9c5d72
rpc: minor cleanups to RPC PR 2017-11-17 14:25:02 +02:00
Armani Ferrante c5b8569707 rpc: disallow PUT and DELETE on HTTP (#15501)
Fixes #15493
2017-11-17 13:07:11 +01:00
Péter Szilágyi 4013e23312
rpc: allow dumb empty requests for AWS health checks 2017-11-16 13:51:06 +02:00
bas-vk 4fe30bf5ad rpc: check content-type for HTTP requests (#15220) 2017-11-09 10:54:58 +01:00
bloonfield 413dc1d265 rpc: fix closure problem in batch processing (#14688)
Demo of the issue: https://play.golang.org/p/EeTLFfppqC
2017-06-26 12:26:22 +03:00
Bas van Kervel a6af56fa4d
rpc: disable CORS if user has not specified custom config 2017-05-02 11:14:40 +02:00
bas-vk 5e29f4be93 cmd/utils, node: remove unused solc references and improve RPC config (#14324)
Currently http cors and websocket origins are a comma separated string in the
config object. These are replaced with string arrays that are more expressive in
case of a config file.
2017-04-12 23:04:14 +02:00
Felix Lange c213fd1fd8 all: import "context" instead of "golang.org/x/net/context"
There is no need to depend on the old context package now that the
minimum Go version is 1.7. The move to "context" eliminates our weird
vendoring setup. Some vendored code still uses golang.org/x/net/context
and it is now vendored in the normal way.

This change triggered new vet checks around context.WithTimeout which
didn't fire with golang.org/x/net/context.
2017-03-22 20:49:15 +01:00
Micah Zoltu 4e4e5fca54 rpc: add support for extended headers in CORS requests (#3783)
Fixes #3762.  Details about parameter:
a62a804a8a/cors.go (L50-L54)
2017-03-16 04:34:08 +01:00
Kenji Siu d85d3c74db internal/debug, internal/ethapi, rpc, swarm/storage: Ran "go fmt" 2016-11-01 18:40:36 +08:00
Jonathan Brown ae341b31c8 rpc: set CORS Max-Age to reduce preflight OPTIONS requests 2016-10-03 20:24:58 +07:00
Felix Lange 91b7690428 rpc: add new client, use it everywhere
The new client implementation supports concurrent requests,
subscriptions and replaces the various ad hoc RPC clients
throughout go-ethereum.
2016-07-22 23:21:27 +02:00
Bas van Kervel aa9fff3e68 rpc: various fixes/enhancements
rpc: be less restrictive on the request id
rpc: improved documentation
console: upgrade web3.js to version 0.16.0
rpc: cache http connections
rpc: rename wsDomains parameter to wsOrigins
2016-04-12 11:02:39 +02:00
Bas van Kervel f7328c5ecb rpc: add pub/sub support 2016-04-01 18:26:35 +02:00
Bas van Kervel a7bae3b2a6 rpc/http: improve request handling 2016-03-23 11:27:08 +01:00
Péter Szilágyi df75dbfd68 cmd, node, rpc: readd inproc RPC client, expose via node 2016-02-09 14:10:40 +02:00
Péter Szilágyi a13bc9d7a1 cmd, common, node, rpc: move HTTP RPC into node, drop singletone aspect 2016-02-05 13:45:36 +02:00
Péter Szilágyi 72c255caef rpc: allow RPC requests on GET too 2016-02-03 00:50:02 +02:00
Bas van Kervel 19b2640e89 rpc: migrated the RPC insterface to a new reflection based RPC layer 2016-01-26 13:51:50 +01:00
Bas van Kervel a4a4e9fcf8 removed old rpc structure and added new inproc api client 2015-06-22 09:17:09 +02:00
Taylor Gerring a2598e649d Permit multiple CORS domains
Separated by spaces
2015-05-18 10:31:03 -05:00
Taylor Gerring 44a7f997c3 Unreverse ordering 2015-05-14 15:50:39 -05:00
Taylor Gerring 5c6540452a Omit replies for notification requests
When Id is missing, the client does not want a response
2015-05-14 12:39:57 -05:00
Péter Szilágyi 0ad5898c0f rpc, xeth: fix #881, gracefully handle offline whisper 2015-05-11 11:53:53 +03:00
Taylor Gerring b071e7f4db Remove old logger from RPC pkg 2015-04-27 09:18:55 -05:00
Bas van Kervel 61885aa965 Don't export types/functions 2015-04-19 10:01:50 +02:00
Bas van Kervel 2c229bac00 Replaced channel pointer field with non pointer channel 2015-04-19 09:55:41 +02:00
Bas van Kervel ead3dd9759 Stop accepted and alive connections (http keep-alive) when the rpc service is stopped 2015-04-16 19:23:57 +02:00
Bas van Kervel 57f93d25bd admin.stopRPC support added which stops the RPC HTTP listener 2015-04-16 12:56:51 +02:00
obscuren d82aaf617c rpc: changed logging to use glog 2015-04-15 00:09:13 +02:00
Taylor Gerring b6fde73ef1 Add settable domain to CORS handler #331 2015-03-29 21:56:04 +02:00
Taylor Gerring 04a7c4ae1e Abstract http into rpc package
New RpcConfig object to pass growing config
2015-03-29 21:26:47 +02:00
Taylor Gerring d9f8b1e0c1 Report InvalidTypeError as -32602 to JSON RPC 2015-03-28 21:42:44 +01:00
Taylor Gerring e29396b691 Use ExtraDB for storage. Fixes #577 2015-03-27 09:36:18 +01:00
Taylor Gerring abc3d8d50a Make send internal 2015-03-19 18:06:26 -04:00
Taylor Gerring 1f2de6ecd5 Remove extra logger 2015-03-19 14:21:42 -04:00
Taylor Gerring 67c9d9c2fa Remove JsonWrapper 2015-03-17 20:14:19 -04:00
Taylor Gerring c6f84325b1 Support JSON RPC batch requests 2015-03-17 17:46:22 -04:00
Taylor Gerring 8fd243ee23 Add JSON RPC batch support
http://www.jsonrpc.org/specification#batch
2015-03-17 17:38:05 -04:00
zelig 16ecb1e2ea rpc
- camelcase fields dont play nice with otto value magic: JsonRpc -> Jsonrpc, ID -> Id
- jeth: ethereum.js rpc transport provider direct bridge between js and ethereumApi via otto jsre
2015-03-15 13:21:54 +07:00
Taylor Gerring d3f96dc720 Consolidate error type switch 2015-03-13 10:03:48 -04:00
Taylor Gerring 094f921e50 Convert to proper errors
Allow returning different JSON RPC error codes depending on error type
2015-03-12 19:07:03 -05:00
Felix Lange 9bf513e993 Merge ethereum/poc-9 into accounts-integration
Conflicts:
	cmd/utils/cmd.go
	cmd/utils/flags.go
	core/manager.go
	eth/backend.go
	rpc/http/server.go
	xeth/xeth.go
2015-03-09 23:25:46 +01:00