# mocksocket **Repository Path**: mirrors_elastic/mocksocket ## Basic Information - **Project Name**: mocksocket - **Description**: Allows using sockets without having to grant dangerous permissions to all of your code. - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2026-03-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # mocksocket Allows using sockets without having to grant dangerous permissions to all of your code. This wraps the Socket and ServerSocket apis with AccessController blocks. No code changes are needed. Instead of: grant { // give scary permission to all code just for tests permission java.net.SocketPermission "*", "accept,connect,resolve"; }; You can do: org.elasticsearch mocksocket 1.0 test ... grant codeBase "/url/to/mocksocket-1.0.jar" { // only allow this jar used in tests to do this permission java.net.SocketPermission "*", "accept,connect,resolve"; };