Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michaelfig/cacao
Cacao (CORS Access-Control-Allow-Origin) Proxy
https://github.com/michaelfig/cacao
cors-anywhere dart2 mjpeg
Last synced: 23 days ago
JSON representation
Cacao (CORS Access-Control-Allow-Origin) Proxy
- Host: GitHub
- URL: https://github.com/michaelfig/cacao
- Owner: michaelfig
- License: isc
- Created: 2018-12-05T04:14:36.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-21T00:15:50.000Z (almost 6 years ago)
- Last Synced: 2024-10-29T21:31:49.039Z (2 months ago)
- Topics: cors-anywhere, dart2, mjpeg
- Language: Dart
- Homepage:
- Size: 228 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Cacao (CORS Access-Control-Allow-Origin) Proxy
Cacao is a localhost Cross-Origin (CORS) proxy. It allows Javascript running in a web browser to access a remote HTTP resource without cross-origin restrictions. It runs on several different platforms, and essentially works by adding a `Access-Control-Allow-Origin: *` header to an HTTP response.
## IP Camera Streaming
The main use case is to access a remote streaming MJPEG URL published by an IP Camera, via an `` tag pointing to Cacao. Without Cacao, this image data is usually marked as cross-origin, and therefore cannot be used as the source for a WebRTC stream.
With Cacao, an `` can be copied to a `` and then (since CORS is allowed) sent by the browser via WebRTC. Try loading the (MJPEG sample)[static/mjpeg.html] in your browser to experiment with this capability, and to understand the vanilla Javascript source code.
The [Mediasoup Broadcast Example](https://github.com/michaelfig/mediasoup-broadcast-example) will eventually add support for using Cacao to request media to stream.
## Usage
### Cacao Proxy
Cacao can be run as a localhost proxy server on Linux (and other Unix-like), MacOS, and Windows.
Download a binary package from the [Cacao releases](https://github.com/michaelfig/cacao/releases), if you just want to use the proxy (and not change its code).
If you are a developer, you can run Cacao directly from sources in this project, but you will first need to install the [Dart SDK](https://www.dartlang.org/tools/sdk#install):
```
$ dart --version
$ bin/cacao --help
```### Cacao Proxy App
See the [Cacao Proxy App](https://github.com/michaelfig/cacao_app) for a graphical app for controlling a builtin Cacao proxy on your mobile device.
Michael FIG , 2018-12-05