Just did this on my truck.
I bought a continuous solenoid relay
Run a 10 gauge wire back to the trailer plug.
Need 30 amp fuse between positive battery and terminal 1 on the solenoid.
Solenoid terminals
1 Positive
2 Ground
3 Wire to back of trailer
4 Switch (hot wire when Ignition is on)