Hold your line, if you have to deviate from it make sure you use your hands to signal your intention. There's tech to help you with that too. Garmin makes a proximity sensor that you can install on your bike that you let you know when cars are getting close to you; and there's my favorite solution, a Bontrager Flare RT rear light. Finally, you should use your bike to explore alternate/less trafficked routes. Bonus tip sourced from anecdata: I've found out that if you can keep up with the traffic speed most drivers will leave you alone.
Keep cycling and have a nice ride! :)