https://github.com/alexfilatov/torex
Make requests to Tor network with Elixir
https://github.com/alexfilatov/torex
elixir tor
Last synced: 12 months ago
JSON representation
Make requests to Tor network with Elixir
- Host: GitHub
- URL: https://github.com/alexfilatov/torex
- Owner: alexfilatov
- Created: 2017-09-30T17:46:39.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-09-18T00:19:16.000Z (almost 3 years ago)
- Last Synced: 2024-11-08T17:04:30.957Z (over 1 year ago)
- Topics: elixir, tor
- Language: Elixir
- Size: 10.7 KB
- Stars: 10
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Simple Tor connection library. (Networking)
- fucking-awesome-elixir - torex - Simple Tor connection library. (Networking)
- awesome-elixir - torex - Simple Tor connection library. (Networking)
- fucking-awesome-elixir - torex - Simple Tor connection library. (Networking)
README
# Torex
[](https://coveralls.io/github/alexfilatov/torex?branch=main)
[](https://hex.pm/packages/torex)
[](https://hexdocs.pm/torex)
[](https://hex.pm/packages/torex)
[](https://opensource.org/licenses/MIT)
[](https://github.com/alexfilatov/torex/commits/master)
Very simple connector to TOR network. Basically this is HTTPoison client with proxy on Tor node.
Before running this project you need to have tor node running.
To install tor node for macos run this:
brew install tor
brew services start tor
You'll have tor running on your machine where you can connect on PORT=9050
## Usage
When Tor is up and running add to your app config the following
```elixir
config :torex,
:tor_server,
ip: '127.0.0.1', # note charlist here, not binary
port: 9050
```
Make requests:
```elixir
{:ok, contents} = Torex.get(url)
{:ok, result} = Torex.post(url, params)
```
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `torex` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:torex, "~> 0.1.0"}]
end
```
## Contribution
1. Fork it
2. Create feature/bugfix branch
3. Code/fix
4. Commit and push
5. Create Pull Request
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/torex](https://hexdocs.pm/torex).