Smuggling is really simple. Starports are almsot all law level zero, and try to be agonist to goods on board. Just because its illegal where the starport is, doesnt mean its legal purchase elsewhere to elsehwere.
So you take the illegal guns. Sell it to a company that specializes getting goods past customs. Never need to do it yourself.
Not sure why tramp traders would ever need to do so. Unless they're smuggling stuff they want for their own private use.