Don't travel to places where it's illegal. And if you do, don't try to acquire anything while in places where the legislation has real teeth. Chances are if weed is illegal, any fun substitute will be as well. Depending on where you are going a positive blood test, should you get in trouble with the law for whatever reason, may still get you in trouble even if all of the weed in your bloodstream was consumed where it was legal to do so. That's also something to consider two months ahead of your trip abroad.
If you are so worried that you cannot break your habitual use you may want to investigate your use pattern even while you are where it is legal. Marijuana addiction is not a huge societal problem overall but it can be for the individual.