Afghan resistance fighters are hiding caches of arms inside Afghanistan in case a settlement between the United States and the Soviet Union ends U.S. support for their movement, well-informed resistance sources said here today.

Representatives of resistance groups with headquarters in this city on the edge of the Khyber Pass said they are concerned that their interests will be sold out if Washington and Moscow want to ease East-West tension by reaching an agreement on the withdrawal of Soviet troops from Afghanistan.

These concerns were triggered, sources said, by reports from Pakistani Foreign Minister Sahabzada Yaqub Khan that "substantive progress" has been made in U.N.-sponsored talks on Afghanistan in Geneva last month. A new round of talks is set for August.

The resistance movement, whose eight-year battle against communism in Afghanistan intensified with the Soviet invasion in December 1979, plays no role in these proximity talks between Afghanistan and Pakistan. They are carried out through a U.N. intermediary, with the United States and the Soviet Union ready to play the role of big power guarantors of any agreement.

The resistance fighters "don't understand what's going on. It's happening behind their backs," said Louis Dupree, an American expert on Afghanistan and a visiting professor at the U.S. Military Academy at West Point.

He is here visiting friends among the resistance groups located here, and confirmed reports from the fighters that they are stockpiling weapons in case the U.S.-financed arms supply pipeline through Pakistan dries up as a result of a peace agreement.

Resistance fighters said they are holding back some of the weapons and ammunition they are receiving from the United States and are saving supplies they capture in battles with Soviet and Afghan forces.

They said the stockpiling is not hurting their fight against the Soviets since they have plenty of more rudimentary weapons and ammunition.

While the resistance fighters talked freely in interviews here, they declined to be quoted directly by either name or group affiliation out of concern that their statements questioning the U.N. peace talks would anger their Pakistani hosts, who have been under increasing pressure from the Soviet Union to end support for the rebels.

Adding to the concerns of the Afghan fighters is an intensification of opposition by politicians in this country to the government's strong support of the Afghan resistance. These opposition statements have come more frequently with the stirrings of democracy in Pakistan after eight years of martial law and the establishment of an elected legislature.

The statements of the opposition leaders are "in favor of the Russians, which is not a responsible thing to do," said Sayd B. Majrooh, head of the Afghan Information Center here.

Two key elements of any settlement would be the withdrawal of the more than 110,000 Soviet troops in Afghanistan and the establishment of an independent, nonaligned government in Kabul that would allow the more than 3 million refugees in this country to return home.

Yaqub Khan told reporters in New Delhi and in Washington that Pakistan and Afghanistan are close to agreement on legal language on three of the four points necessary for ending the Soviets' 5 1/2-year occupation of Afghanistan. The major sticking point is a timetable for the Soviet withdrawal, he said.

The resistance fighters questioned the legitimacy of any agreement made by the Afghan government of Babrak Karmal, who was installed by the Soviet invasion force.

Majrooh said the political strength inside Afghanistan of the anti-Soviet resistance is not being considered by the Soviets.

He said some of the major commanders of resistance forces inside Afghanistan -- who have set up local administrations with schools, hospitals and welfare systems in the areas they control -- must be brought into the talks for any settlement to be successful.