Skip to content

implement bit shift node#197

Open
Vizonex wants to merge 2 commits into
nodejs:masterfrom
Vizonex:shift-node
Open

implement bit shift node#197
Vizonex wants to merge 2 commits into
nodejs:masterfrom
Vizonex:shift-node

Conversation

@Vizonex
Copy link
Copy Markdown

@Vizonex Vizonex commented May 26, 2026

I read the old pull request from 6 years ago that attempted to implement integer packing and with my desire to write a new socks5 parser soon that parses negotiation packets on both the client and server's end as part of RFC1928 I knew that doing so would not be an easy task. Currently It requires some functionality that llparse currently doesn't implement. My goal here is to change that entirely as I understand llparse's code architecture pretty well as I have made a python parody of this library already.

Goals with this Pull Request

  • To revive the llparse typescript library as a whole as well as add a few new features to it so that llparse can continue receiving maintenance.

  • Provide a new node that is small and be easy to maintain

  • Have actual tests provided to increase the likelihood of these features being added in.

  • A tool which I named ShiftChecker named after the LoopChecker is also provided to

    • validate Shift nodes for missing fields
    • check for integer sizes that could overflow the parser state's fields
    • check for inappropriate fields that can't be shifted into such as the ptr type.

This solution provides the ability to pack bytes and it simplifies @arthurschreiber's original work and makes the implementation smaller.

The reason I would like for a llsocks5 library to use typescript however is because more people know how to use llparse in the typescript language which means I could be possibly given outside help as well as better feedback which is why I am doing this all to begin with. I might also look into making an smtp parser even though my understanding of the smtp protocol isn't as good as my understanding with the socks5 protocol is which is why I am working on a new socks5 parser first.

closes #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant