Think of Hamas as a mafia state like Russia. Their leaders started out as refugees themselves and are now billionaires living in Qatar. They become rich by siphoning off a percentage of foreign aid along with a percentage of trade & commerce in Gaza. Hamas themselves say Iran helps smuggle and provide weapons, it's not a conspiracy it's out in the open. The United States Navy routinely interdicts ships smuggling Iranian weapons:
Iran continued to be the leading state sponsor of terrorism, facilitating a wide range of terrorist and other illicit activities around the world. Regionally, Iran supported acts of terrorism in Bahrain, Iraq, Lebanon, Syria, and Yemen through proxies and partner groups such as Hizballah and Hamas. Additionally, senior AQ leaders continued to reside in Iran and engaged with other AQ elements from the country. Globally, the Ministry of Intelligence and Security remained Iran’s primary actor involved in supporting terrorist recruitment, financing, and plots across Africa, Asia, Europe, and North and South America. Iran also maintained a near-global procurement network, obtaining cutting-edge technology from companies and locales around the world to bolster its terrorist and military capabilities.
https://www.state.gov/wp-content/upl...Accessible.pdf