{"id":13641599,"url":"https://github.com/breakerspace/bento","last_synced_at":"2025-04-20T11:31:25.983Z","repository":{"id":48578101,"uuid":"370866203","full_name":"breakerspace/bento","owner":"breakerspace","description":"Bento is an architecture for adding programmable \"middleboxes\" to the Tor anonymity network.","archived":false,"fork":false,"pushed_at":"2021-07-19T20:58:30.000Z","size":3467,"stargazers_count":7,"open_issues_count":5,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-08-03T01:24:03.840Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/breakerspace.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-26T00:52:53.000Z","updated_at":"2023-12-08T18:31:10.000Z","dependencies_parsed_at":"2022-08-25T10:10:11.824Z","dependency_job_id":null,"html_url":"https://github.com/breakerspace/bento","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breakerspace%2Fbento","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breakerspace%2Fbento/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breakerspace%2Fbento/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breakerspace%2Fbento/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/breakerspace","download_url":"https://codeload.github.com/breakerspace/bento/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223827459,"owners_count":17209795,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T01:01:22.125Z","updated_at":"2024-11-09T12:30:32.819Z","avatar_url":"https://github.com/breakerspace.png","language":"Python","readme":"#### Navigation\n- **bento**: source for the client and server packages     \n- **experiments**: self contained projects/experiments using Bento   \n- **testing**: simple tests and sample functions    \n- **docs**: [Bento website](https://barc-purdue.github.io/BentoDocs/index.html)\n\n\n#### Notes:\nTested with python3.6 on Ubuntu 18.04.\n\n\n#### Starting a Bento server:\nNavigate to `bento/server/` and execute:\n\n```\n./runserver.py\n```\n\nUse `-h` to list the command-line options.  By default, the server listens on\n`0.0.0.0:8888` and runs in the current directory.  For storing temporary files,\nthe server creates the directories `functions/` and `sessions/` if they do\nnot already exist.\n\n\n#### Run a sample function as a client:\nAfter starting the Bento server, you can connect to it and test it with the\nexamples in `testing/`.  For instance, execute:\n\n```\ncd testing\n./test_hello_world.py   \n```\n\nto run a client that uploads and executes a function that simply sends back\n\"hello world\".\n\nMost of the test scripts display a usage statement when passed the `-h`\ncommand-line option.\n\n\n#### Writing a function:\nA Bento function is a normal Python function that runs on a Bento server.\nThe only difference is that a Bento function executes in an environment that is\ninitialized with a function API (see `bento/server/core/api.py`) for\ncommunicating with the client.  In particular, the function must use\n`api.send()` and `api.recv()` to send and receive data from the client, rather\nthan `print()` and `input()`.\n\nThe Bento client API (see `bento/client/api.py`) provides an RPC interface for\nuploading, executing, and performing IO with a function. \n\nThe scripts and functions in `testing/` provide example uses of both the\nfunction and client API.  You can also use `experiments/interactive_client.py`\nto send requests to a Bento server from the command-line.\n\n\n#### Connecting the Bento Client with the Bento Server over Tor:\nThe Bento client API is unaware of Tor.  To enable the client to communicate\nwith a Bento server over a Tor circuit, execute the client with the \n[torify](https://gitlab.torproject.org/legacy/trac/-/wikis/doc/TorifyHOWTO)\nwrapper.  For instance, to run the `test_hello_world.py` over Tor, enter:\n\n```\ncd testing/\ntorify ./test_hello_world.py\n```\n\n`torify` is a utility that comes with Tor; it uses `LD_PRELOAD` to encapsulate\nan application's socket calls in the SOCKS protocol and redirect these calls to\na local Onion proxy.  In this way, an application can use Tor without having to\nimplement native support for Tor.\n\n\n#### Running functions in an SGX enclave:\nBy default, a Bento server executes functions using the Python3.6 interpreter\nin the standard, userland environment.  To execute functions with the Python\ninterpreter running in an SGX enclave, instead enter:\n\n```\ncd server\n./runserver.py -c 'graphene-sgx/pal_loader graphene-sgx/manifest'\n```\n\nThe `-c` option specifies the command the server uses to execute the function.\nIn this example, the command specifies to run the Graphene-SGX library\noperating system (libOS), and for the libOS to load a Graphene manifest file\nfor Python.  See [Graphene-SGX](https://github.com/oscarlab/graphene) for\ninstructions on building the Graphene-SGX library operating system and creating\na manifest file.\n","funding_links":[],"categories":["Network"],"sub_categories":["Library OSes and SDKs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbreakerspace%2Fbento","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbreakerspace%2Fbento","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbreakerspace%2Fbento/lists"}