Skip to content

Commit

Permalink
Update README.md to mention removal of policy support
Browse files Browse the repository at this point in the history
  • Loading branch information
Xyene authored Sep 15, 2021
1 parent ec5e9ed commit 3173587
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
# java-sandbox-agent [![Build Status](https://github.com/DMOJ/java-sandbox-agent/workflows/build/badge.svg)](https://github.com/DMOJ/java-sandbox-agent/actions/)
Policy-based Java sandbox with instrumentation support for online judges.
Java class sandbox with instrumentation support for online judges.

It implements:

* [**security policy-based sandboxing**](https://docs.oracle.com/javase/7/docs/technotes/guides/security/PolicyFiles.html) (see [**DMOJ/judge**](https://github.com/DMOJ/judge) for [example policy](https://github.com/DMOJ/judge/blob/master/dmoj/executors/java-security.policy))
* a much faster, [unsynchronized ASCII-only `System.out` stream](https://github.com/DMOJ/java-sandbox-agent/blob/master/src/main/java/ca/dmoj/java/UnsafePrintStream.java) that's suitable for single-threaded online-judging scenarios
* support for **disallowing particular classes from being loaded**, to force certain solutions trivialized by the standard library
* optional **unbuffering of standard output**, for interactive problems without requiring users to flush manually
* logging of exceptional exits to a state file

## Usage

To run a class `Submission` with agent and policy stored in `/code`, the following suffices:
To run a class `Submission` with agent the following suffices:

```
$ java -client -javaagent:/code/java-sandbox-agent.jar=policy:/code/policy[,option ...] Submission
$ java -client -javaagent:/code/java-sandbox-agent.jar=[option, ...] Submission
```

Supported fields for the `option` list are:

* `nobigmath` — disables `BigInteger` and `BigDecimal`, raising [appropriate exceptions](https://github.com/DMOJ/java-sandbox-agent/blob/master/src/main/java/ca/dmoj/java/BigIntegerDisallowedException.java) if they are used
* `unicode` — encodes `System.out` as UTF-8 instead of ASCII, sacrificing performance for Unicode support
* `nobuf` — sets `System.out` as being line-buffered, for interactive problems

0 comments on commit 3173587

Please sign in to comment.