https://github.com/gmelodie/bilonga
Useless reverse proxy, middleware or "that shit that stays in the middle" (whaterver you wanna call it, we call it Bilonga)
https://github.com/gmelodie/bilonga
Last synced: 4 months ago
JSON representation
Useless reverse proxy, middleware or "that shit that stays in the middle" (whaterver you wanna call it, we call it Bilonga)
- Host: GitHub
- URL: https://github.com/gmelodie/bilonga
- Owner: gmelodie
- License: mit
- Created: 2021-10-31T20:31:19.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-11-06T13:55:11.000Z (almost 4 years ago)
- Last Synced: 2025-01-24T11:44:33.421Z (9 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bilonga
Useless reverse proxy, middleware or "that shit that stays in the middle" (whaterver you wanna call it, we call it Bilonga)
## Usage
```python
import bilonga
my_app = bilonga.Bilonga()
@my_app.connection_handler(81,8081)
def my_handler(data):
if data == 'hello\n':
return data + "this is a hello", True # allow data flow
return data + "this is NOT a hello", False # this gets filtered
my_app.run()
```
**Obs:** handlers should always return `new_data` and a boolean `allow_data_flow` that specifies whether to
pass the data through or not.