How to find connections to go abroad as a visisting PhD student? I'm PhD student and I want to go abroad as a visiting PhD student. 

Is it recommended to contact professors directly if you want to collaborate as a visiting PhD student?  or it is better to get connection through your supervisor? 
My supervisor doesn't have any connection for the places that I want to go!
As a PhD student I did exactly that, contacting professors for exchange about two years ago, and that worked very well for me. (I ended up visiting a top UK university and the collaboration was, and still is, very productive.) My supervisor was involved in discussing the places I wanted to go, but I handled all contact. Some advice:


Study the professor's webpage (if they have one) to see if it says anything about collaborations. If it says on their webpage that they have no time, don't contact them.
Send the professor an email, give them a week or two to answer, then follow up with a second reminder-email if there is no reply.
Important things to do/mention:


Make sure the email is very short, but that it still describes precisely what you want to collaborate on. Professors are chronically short on time. 
If you have a travel grant etc. that will fund your stay, it's important to say so. (They're much more likely to accept you if they don't have to spend any money. But I think most universities will waive term fees if you ask them.)
Add a sentence about your accomplishments so far, so they have some
impression that having you visit is going to be a net gain for them. Mention any papers you've co-authored, if you add a link make sure it's short (DOI, arXiv etc).
Try to keep the email self-contained, but linking to any papers, your CV or research webpage "for more information about me" is OK.
Also add a sentence describing how you think your proposed topic fits
with what they are doing, so they know you've actually checked out their group and read some of their papers etc.



In my experience, most people reply positively to such an email, so first send emails to the two or three places you want to visit the most. If none of those are successful, send to the next few places on your list. YMMV though.