An open API service indexing awesome lists of open source software.

https://github.com/eifinger/ip-range-filter

Filter AWS IP ranges to provide input for AWS Security Group Rules
https://github.com/eifinger/ip-range-filter

Last synced: 23 days ago
JSON representation

Filter AWS IP ranges to provide input for AWS Security Group Rules

Awesome Lists containing this project

README

        

# IP-Range-Filter

Application which allows you to filter IP ranges as defined in https://ip-ranges.amazonaws.com/ip-ranges.json.

## Usage

The application is packaged and published as a docker container. If you have Docker installed you can run it locally
and use curl or postman to use it.

````shell
docker run -p 8080:8080 -d ghcr.io/eifinger/ip-range-filter:latest
curl --location --request GET 'http://localhost:8080/ip-ranges?region=AP'
````

Allowed regions are `EU`,`US`,`AP`,`CN`,`SA`,`AF`,`CA`,`ALL`

You can also use the Swagger-UI under http://localhost:8080http://swagger-ui.html

## Testing the application

Due to the fact that this application is very small and has trivial logic no separate unit tests have been written.

All tests are e2e/integration tests which test against a [MockWebServer](https://github.com/square/okhttp/tree/master/mockwebserver).

This provides the benefit that the whole application with serializing, dependencies,... is tested.

When the application grows in complexity this approach should be revisited.

````shell
./gradlew test
````