How I got each of my current clients:
Person in my college class gets a job and two years later contacts the computer science department at my college and asks if they "know any freelancers." I had made it known to my professors that I was going into freelancing and they connected us. Client for 3+ years.
Joined a coworking space and chatted with a guy. Mentioned I do freelance work. Built rapport. 3 weeks later I'm siting in the coworking space and he comes up to me and says "I am getting a full time job and can't keep this client. Do you want them?" Client for 3+ years.
I was a teacher's assistant at a college class about software engineering. Made friends with a student. 3 years later his friend was graduating and interested in freelance. The first student connected us. I offered to meet for coffee with the younger student, told him everything I know about freelancing. 3 months later he contacts me and says "I decided not to freelance, but this client wants a site, do you want them?" Primary client for the first half of 2018.
I discovered a podcast I enjoyed by a thought leader in the consulting space about how to find a niche. I sent him an email saying "Hey I liked your podcast. My niche is Django development." Later another person who does Django work contacts this thought leader, he shows this person my website. This person joins my mailing list. I see that person has joined and so sent him an email saying hello what up. We connect over the fact that we both do Django. 3 months later he says "my primary client needs more help with a Django site." This is how I got my current primary client.
This doesn't really work as a short term strategy but the quality of clients compared to say Upwork is night and day. Provide value, make connections, get lucky.