Another merchant in the Beach Camp market said that Hamas, which tightly controls tunnel traffic on the Egyptian border, had raised taxes on basic items, including canned goods and building materials. There is a tax of about 70 cents on every pack of cigarettes, and around $2.50 on every gallon of gasoline or diesel, fixed even if the final price is roughly half that of Israeli gasoline. People pay to apply for identification cards, drivers’ licenses, building permits — “there are fees for everything,” the merchant said.

Larger businesses are especially targeted for high taxes. “Now businessmen know the difference between Fatah and Hamas,” another merchant said.

Adham Badawi, 22, bought an Egyptian-assembled, three-wheel Chinese motorcycle cart for his family textile shop for $1,500, “imported” through the tunnels. He had to pay $395 in tax, plus registration, insurance and a driver’s license. He says the contraption is better than a donkey because it eats only when in use and does not need to be looked after. But the fees are expensive, he said, and he is nervous about renewing his license, registration and insurance.

Hamas needs money not only for salaries, government and its charitable activities, but also for the Qassam Brigades, which some experts estimate at 20,000 men — most of whom were on show for Mr. Meshal’s visit, in uniforms with good boots and black balaclavas covering their faces, and armed with automatic rifles and other equipment, some of it smuggled from Libya.

The budget for the Qassam Brigades is not revealed, and its main task is to protect Hamas. But it has also been at the forefront of military relations with Iran and Syria, in rocket importation and development and even drone development with Iranian aid, Israeli officials say. The longer-range rocket and drone development was a particularly important target for Israel in the eight-day conflict last month, they say.

But the brigade has also been active in the building of secret underground fortifications, which require many men and large amounts of building supplies, like steel and cement. In a speech on Saturday, Prime Minister Ismail Haniya praised the brigade for its “underground work,” saying for the first time that 40 to 50 men had died laboring underground, which he said previously had been described simply as killed in “jihadi missions.” During the fighting with Israel, there were few Hamas fighters or leaders to be seen: they were all somewhere underground or in hiding in what Israel considers to be an intricate system of tunnels and bunkers modeled on those built with Iranian guidance by Hezbollah in southern Lebanon.