Please see example of configuration file: conf.json (In this file you can see our configuration options)
The value of this option is string like "{host}:{port}"
.
If this option is specified gVisor will be listening on it for requests. Users can interact with already running gVisor using such url.
gVisor uses custom protocol for requests and responses.
Now the simplest way to communicate with gVisor is to use sandbox-cli
The value of this option is also string like "{host}:{port}"
.
If this option is specified gVisor will be sending strace logs to log-socket
(don't forget to specify -strace
option then running runsc).
Users can send custom logs to this socket by using accessors.logJson()
If nobody listens on log-socket
and the option was specified gVisor will exit immediately.
The value of this option is array (maybe empty) of objects like below (taken from the example conf.json)
{
"sysno": 49,
"entry-point": "myFunctionBefore49",
"source": "function myFunctionBefore49(arg) {accessors.print(\"hello world!!!\\n\")\naccessors.print(arg)}",
"type": "before"
}
sysno
- the number of syscall for which hook should be registeredentry-point
- the name of function to executesource
- the function together with the bodytype
- when the hook should be executed (before or after)