Coder Social home page Coder Social logo

Rewrite `stunnerctl` in Go about stunner HOT 5 CLOSED

l7mp avatar l7mp commented on May 23, 2024
Rewrite `stunnerctl` in Go

from stunner.

Comments (5)

levaitamas avatar levaitamas commented on May 23, 2024 1

Hi @bananu7,

Wow, nice catch! 💯 We also have a net-debug image that has turncat built-in: https://hub.docker.com/r/l7mp/net-debug

Sorry about the build failures, and thank you for your feedback! TBH, we never tried to compile turncat on Windows.
On Ubuntu/Alpine this should work on amd64 and arm64 machines (taken from the net-debug Dockerfile):

CGO_ENABLED=0 GOOS=linux go build -ldflags="-w -s" -trimpath -o turncat cmd/turncat/main.go

I think for most of Stunner's userbase the dockerized release is fine, if it's maintained and in the readme.

That's a good point. We will definitely mention it in the docs. Thanks!

from stunner.

bananu7 avatar bananu7 commented on May 23, 2024

As a user, stunnerctl works perfectly fine for me. turncat, OTOH, being written in Go, is a source of problems.

from stunner.

levaitamas avatar levaitamas commented on May 23, 2024

hi @bananu7,

Great, happy to hear that stunnerctl works well!
I am wondering whether releasing binaries for turncat would help. What do you think?

from stunner.

bananu7 avatar bananu7 commented on May 23, 2024

@levaitamas You're actually releasing the binaries, just not advertising it :) https://hub.docker.com/r/l7mp/turncat

I was quite angry at it not working yesterday (as you can imagine), but being real for a second:

  • it didn't compile on Windows because of platform specific API (I assume?)
.\uri.go:149:29: cannot use int(descriptor) (value of type int) as syscall.Handle value in argument to syscall.SetsockoptInt
  • it didn't compile on Ubuntu because of...
non-pc-relative relocation address for go:info.int is too big

I'd happily build it but after two tries I kind of lost my patience. I think for most of Stunner's userbase the dockerized release is fine, if it's maintained and in the readme.

from stunner.

rg0now avatar rg0now commented on May 23, 2024

As per the Windows compilation problem, I think it is indeed a platform issue. This is quite puzzling given that we deliberately use the syscall package that is supposed to be portable across OSes, instead of golang.org/x/sys/unix that contains the UNIX specific stuff. Maybe we could steal some ideas from go-reuse to make turncat really portable? Anyone care to submit a PR?

from stunner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.