socksify
Version, currently 0.1.05 versions
- 0.3.0latestJun 13, 2025
- 0.2.1not indexedJun 13, 2025
- 0.2.0not indexedJun 13, 2025
- 0.1.0not indexedJun 13, 2025
- 0.0.0not indexedJun 13, 2025
github.com/Dakad/socksify-cr
Crystal version of Socksify-ruby gem
Nothing has been indexed for 0.1.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
socksify:
github: Dakad/socksify-cr
version: ~> 0.1.0Then run:
shards installshard.yml
No shard.yml has been indexed for 0.1.0. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
socksify-cr
Little Proxy client library for HTTP and SOCKS type
Installation
-
Add the dependency to your
shard.yml:dependencies: socksify: github: dakad/socksify-cr -
Run
shards install
Usage
require "socksify"
Socksify::Proxy.configure do |config|
config.timeout_sec = 60
config.max_retries = 2
end
host = URI.parse "https://example.com"
client = Socksify::HTTPClient.new(host, ignore_env: true)
proxy = Socksify::Proxy.new "http://127.0.0.1:18080"
proxy = Socksify::Proxy.new "socks5://127.0.0.1:9150"
client.set_proxy proxy
response = client.exec("GET", "/me")
client close
Configure the Proxy connection
require "socksify"
Socksify::Proxy.configure do |config|
config.connect_timeout_sec = 60
config.timeout_sec = 30
config.max_retries = 2
end
- connect_timeout_sec: Limit the connection timeout on the proxy socket and HTTT::Client
- timeout_sec: Other timeout (dns,read,write)
- max_retries: Number of retries after error during TCPSocket creation or connection
Development
Run crystal spec to run project's tests. To run and setup a real SOCKS server, we can use this lib under docker
You can also manually run the examples under /examples
To debug, follow this link's guide to setup gdb/lldb with VSCode.
For Vim, run the commands below:
-
shards build --debug --progress simpleto build for debug one the specified target inshards.yml -
Or
crystal build --debug --progress -o bin/simple examples/simple.crbuild your file directly -
gdb bin/simpleto debug the compiled code -
(gdb) runWill run the compiled source and maybe throw an error in the console, but don't mind :)
Program received signal SIGSEGV, Segmentation fault. 0x000055555589365e in GC_find_limit_with_bound ()
5. (gdb) continue
6. Here is a gdb cheatsheet's link
Contributing
- Fork it (https://github.com/Dakad/socksify-cr)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Merge Request
Contributors
- @DakaD - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.0- Tagged
- Jun 13, 2025
- Commit
deb6d98c18e6- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/Dakad/socksify-cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 5