With the consent of the proper authorities, imported merchandise, in bond or duty-paid, and products and manufactures of the United States may be transported from one port to another in the United States through contiguous countries, under such regulations as the Secretary of the Treasury shall prescribe, unless such transportation is in violation of section 4347 of the Revised Statutes, as amended, section
55102 of title
46, or section
1588 of this title.