Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
This is a small telnet server for JRuby.
It is based on the Netty project. Netty is written in java, but I wanted to write ruby.
Follow these instructions to get a telnet server echo program running.
You may run the telnet server in a container.
colima start
docker-compose up --detach
nc localhost 21
docker-compose down
Building the image or running the container:
docker build --tag telnet-server-jruby .
docker run --detach --publish 21:21 --name telnet-server-jruby telnet-server-jruby
Run directly with the required dependencies installed.
The mise CLI tool used to manage multiple runtime versions.
See: https://mise.jdx.dev/getting-started.html
curl https://mise.jdx.dev/install.sh | sh
~/.local/bin/mise --version
mise 2024.x.x
Enable mise activation in future zsh sessions.
echo 'eval "$(~/.local/bin/mise activate zsh)"' >> ~/.zshrc
Use mise to install the runtime software defined as requirements in the .tool-versions file.
mise install
Install the project dependencies.
gem install bundler
bundle install
The entrypoint for the web application service may now be invoked from a command line interface terminal shell.
bundle exec ./telnet.rb &
nc localhost 21
To clean the project, run unit tests, build the gem file, and verify that the built artifact works, execute:
bundle exec rake
To publish the gem, execute:
bundle exec rake publish
Here is a bird's-eye view of the project layout.
# date && tree -A -I "logs|vendor|tmp|Gemfile.lock"
Sun Jul 24 14:18:45 CDT 2022
.
├── Dockerfile
├── Gemfile
├── LICENSE
├── README.md
├── Rakefile
├── docker-compose.yaml
├── docs
│ └── examples
│ ├── custom_server.rb
│ └── programmatic_client.rb
├── exe
│ └── telnet
├── lib
│ ├── log.rb
│ ├── telnet
│ │ ├── argument_parser.rb
│ │ ├── config.rb
│ │ ├── instance_methods.rb
│ │ ├── server.rb
│ │ └── version.rb
│ ├── telnet-server.rb
│ ├── telnet_client.rb
│ └── telnet_server.rb
├── spec
│ ├── spec_helper.rb
│ ├── test_spec.rb
│ └── verify
│ └── verify_spec.rb
├── telnet-server-1.0.4-java.gem
├── telnet-server-jruby.gemspec
├── telnet-server-jruby.png
└── telnet.rb
7 directories, 25 files
Use the GitLab CI Linting API to validate the syntax of a CI definition file.
jq --null-input --arg yaml "$(<.gitlab/ci/gem.gitlab-ci.yml)" '.content=$yaml' | curl --silent --location https://gitlab.com/api/v4/ci/lint --header "PRIVATE-TOKEN: ${GITLAB_COM_API_PRIVATE_TOKEN}" --header "Content-Type: application/json" --data @- | jq --raw-output '.errors[0]'
Generate a deploy key.
ssh-keygen -t ed25519 -P '' -C deploy_key -f deploy_key_ed25519
Use the GitLab Project-level Variables API to add the deploy key as a ssh private key variable.
project_path="nelsnelson/$(basename $(pwd))"
# Test auth token validity
curl --silent --show-error --location "https://gitlab.com/api/v4/projects" --header "PRIVATE-TOKEN: ${GITLAB_COM_API_PRIVATE_TOKEN}" | jq '.[0]["id"]'
project=$(curl --silent --show-error --location "https://gitlab.com/api/v4/search?scope=projects&search=${project_path}" --header "PRIVATE-TOKEN: ${GITLAB_COM_API_PRIVATE_TOKEN}" | jq --arg project_path "${project_path}" '.[] | select(.path_with_namespace == $project_path)')
project_id=$(curl --silent --show-error --location "https://gitlab.com/api/v4/search?scope=projects&search=${project_path}" --header "PRIVATE-TOKEN: ${GITLAB_COM_API_PRIVATE_TOKEN}" | jq --arg project_path "${project_path}" '.[] | select(.path_with_namespace == $project_path) | .id')
# Add the deploy_token as a CI variable:
curl --silent --show-error --location --request POST "https://gitlab.com/api/v4/projects/${project_id}/variables" --header "PRIVATE-TOKEN: ${GITLAB_COM_API_PRIVATE_TOKEN}" --form "key=SSH_PRIVATE_KEY" --form "value=$(cat ./deploy_key_ed25519)" --form "protected=true" | jq
Use the Deploy keys API to add a the public deploy key as a deploy key for the project.
curl --silent --show-error --location --request POST "https://gitlab.com/api/v4/projects/${project_id}/deploy_keys" --header "PRIVATE-TOKEN: ${GITLAB_COM_API_PRIVATE_TOKEN}" --form "title=deploy_key" --form "key=$(cat ./deploy_key_ed25519.pub)" --form "can_push=true" | jq
FAQs
Unknown package
We found that telnet-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.