
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
ProtoLink is a library for interfacing with ProtoNet, the next-gen internet infrastructure. Truly social and people-powered.
Version: 0.2.1
Tests are in test/all_test.rb.
See Gemfile
# CHANNELS
# simple message
require 'rubygems'
require 'protolink'
protonet = Protolink::Protonet.open('HTTP://SUBDOMAIN.DOMAIN.DE', 'USERLOGIN', 'PASSWORD')
channel = protonet.channels.first
channel.speak 'Hello world!'
# post message in specific channel
require 'rubygems'
require 'protolink'
protonet = Protolink::Protonet.open('HTTP://SUBDOMAIN.DOMAIN.DE', 'USERLOGIN', 'PASSWORD')
channel = protonet.find_channel_by_name("test")
channel.speak 'Hello world!'
# create a channel
require 'rubygems'
require 'protolink'
protonet = Protolink::Protonet.open('HTTP://SUBDOMAIN.DOMAIN.DE', 'USERLOGIN', 'PASSWORD')
channel = protonet.create_channel(:name => "test", :description => "This is the description... woah", :skip_autosubscribe => true)
channel.speak 'Hello world!'
# find channel by id
require 'rubygems'
require 'protolink'
protonet = Protolink::Protonet.open('HTTP://SUBDOMAIN.DOMAIN.DE', 'USERLOGIN', 'PASSWORD')
channel = protonet.find_channel(117)
channel.speak 'Hello world!'
# find or create a channel
require 'rubygems'
require 'protolink'
protonet = Protolink::Protonet.open('HTTP://SUBDOMAIN.DOMAIN.DE', 'USERLOGIN', 'PASSWORD')
channel = protonet.find_or_create_channel_by_name("test", :description => "This is the description... woah")
channel.speak 'Hello world!'
# USERS
# find user by login
require 'rubygems'
require 'protolink'
protonet = Protolink::Protonet.open('HTTP://SUBDOMAIN.DOMAIN.DE', 'USERLOGIN', 'PASSWORD')
user = protonet.find_user_by_login("bjoern.dorra")
# find user by id
require 'rubygems'
require 'protolink'
protonet = Protolink::Protonet.open('HTTP://SUBDOMAIN.DOMAIN.DE', 'USERLOGIN', 'PASSWORD')
user = protonet.find_user(117)
# create a user
require 'rubygems'
require 'protolink'
protonet = Protolink::Protonet.open('HTTP://SUBDOMAIN.DOMAIN.DE', 'USERLOGIN', 'PASSWORD')
user = protonet.create_user(:login => "testuser", :password => "userpassword", :name => "Test-User", :email => "test@test.de")
# find or create a user
require 'rubygems'
require 'protolink'
protonet = Protolink::Protonet.open('HTTP://SUBDOMAIN.DOMAIN.DE', 'USERLOGIN', 'PASSWORD')
user = protonet.find_or_create_user_by_login("testuser", :password => "mymassword", :name => "Test-User", :email => "test@test.de")
# get users auth_token for auto-login
require 'rubygems'
require 'protolink'
protonet = Protolink::Protonet.open('HTTP://SUBDOMAIN.DOMAIN.DE', 'USERLOGIN', 'PASSWORD')
user = protonet.find_user_by_name("bjoern.dorra")
user.auth_token
=> "A19zNgCzgv4RGDGPc2mL"
# LISTENS
# create a listen
require 'rubygems'
require 'protolink'
protonet = Protolink::Protonet.open('HTTP://SUBDOMAIN.DOMAIN.DE', 'USERLOGIN', 'PASSWORD')
user = protonet.find_user_by_login("bjoern.dorra")
channel = protonet.find_channel_by_name("test")
protonet.create_listen(user.id, channel.id)
# destroy a listen
require 'rubygems'
require 'protolink'
protonet = Protolink::Protonet.open('HTTP://SUBDOMAIN.DOMAIN.DE', 'USERLOGIN', 'PASSWORD')
user = protonet.find_user_by_login("bjoern.dorra")
channel = protonet.find_channel_by_name("test")
protonet.destroy_listen(user.id, channel.id)
# CREATE AND SUBSCRIBE
require 'rubygems'
require 'protolink'
protonet = Protolink::Protonet.open('localhost:3000', 'bjoern.dorra', 'geheim')
user = protonet.find_or_create_user_by_login("johndoe", "password", "JohnDoe", "john@doe.com")
auth_token = user.auth_token
channel = protonet.find_or_create_channel_by_name("test", "This is a test channel!")
protonet.create_listen(user.id, channel.id)
"\nhttp://localhost:3000/?auth_token=#{auth_token}"
gem install protolink
$LOAD_PATH.unshift "#{`pwd`.strip}/lib" # project directory
require 'rubygems'
require 'protolink'
require 'ruby-debug'
Debugger.start
# change this if you need to connect to another server
PTN_SERVER = "http://localhost:3000"
PTN_USER = "admin"
PTN_PASS = "admin"
protonet = Protolink::Protonet.open(PTN_SERVER, PTN_USER, PTN_PASS)
If you find what looks like a bug:
If you want to contribute an enhancement or a fix:
FAQs
Unknown package
We found that protolink demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.