On the main highway leading from the Vietnamese border toward this bustling South China city, a convoy of 20 dirty green buses rumbles north carrying yet another thousand ethnic Chinese refugees toward an uncertain future.

Soiled brown faces stare vacantly out the bus windows. Old knapsacks and beat-up suitcases lie strapped to each vehicle's roof.

Through the long summer days of 100-degree heat, the people of South China have grown accustomed to the sight of Chinese refugees, daily additions to a flood of 150,000 escaping from neighboring Vietnam.

But on a rare visit by an American journalist to South China, the influx of unwanted refugees to this area and Peking's steadily deteriorating relations with Vietnam appeared to have produced a climate of uneasiness.

The Chinese are slapping together makeshift homes for the refugees and digging new underground shelters for themselves, the latter apparently motivated by somewhat exaggarated Chinese perceptions of an emerging threat from the south.

Underneath the Kwangsi University campus in Northwest Nanning and under other large building complexes, air-raid shelters are being slowly dug into the red clay soil.

The Chinese started them in the late 1960s and early 1970s, although the work was sometimes neglected until about two years ago, officials here said. Then the centuries-old racial and national animosities that have often laid waste this rich land surfaced again, as the American threat far to the south evaporated and Sino-Vietnamese Socialist solidarity began to crumble.

In Nanning, Kweilin, Liuchow, Canton and the rest of South China the need to protect people from attacks by the Soviets 2,500 miles to the north had not seemed crucial. But now there is Vietnam, only 100 miles to the south and loaded with Soviet and captured American arms.

Vietnam remains an old and difficult memory, sunk down deep into the hills that surround this place. More than 2,000 years ago this was Vietnam, but the ethnic group that now rules in Hanoi was pushed south as each new Chinese empire flexed its muscles.

It must seem strange to the Chinese and the Vietnamese that a white race from the far north whom neither of them likes much - the Russians - should now be so deeply involved in the ancient quarrel. But they are, and China's great distrust of the Russians simply adds to all the old intrigues that have survived here.

For all the informality and summertime ease of this and other sweltering towns of the Kwangsi Chuang Autonomous Region, what the Chinese call this border area, people here still talk of spies.

The thousands of refugees, although portrayed as China's ethnic kin escaping cruel Vietnamese persecution, present a rich opportunity for espionage by Hanoi.

The official New China News Agency reported from here the arrest in a border town of one 29-year-old ethnic Chinese, Chen Yu-Kuei, on charges of spying for Hanoi. The agency said Chen was just one of several "secret agents (who) gained access into China by mingling themselves with the influx of expelled Chinese residents."

That may explain why this headquarters of the Regional revolutionary Committee and other important government offices has been nearly stripped clean of refugees.

Some were temporarily located here, but they have been moved out of town now to large state farms established 10 to 20 years ago to house previous waves of overseas Chinese returning to the motherland. Any wouldbe spies sent to the farms would find themselves far from big cities or military installations, and restricted to contact with other Chinese born outside China.

Many refugees from Vietnam have moved to two large state farms more than 20 miles out of town near Wuhua village, one state farm official said. The overseas Chinese who settled there in the 1960s after escaping discrimination in Indonesia have had to double up on quarters, food and furniture with their new brethren from Vietnam.

Many of the new refugees have reportedly left city jobs, but in Wuhua they must get used to climbing the rolling hills of Kwangsi and earn their living picking tea and hemp in a torrid climate on the same lattitude as Cuba.

"I have seen some of the refugees," said Yin Chien-Chou, a young tourist guide here." They were brought to a certain part of the city, many of them, but now they have been dispersed to farms. They seemed very thin. You could tell they were very poor, from their clothing."

Peking has insisted that most of the refugees are poor workers who want to do their best for the motherland, but Chinese refugees who have reached Hong Kong and other parts of Southeast Asia dispute this. They describe a harried mass of people taking the easiest escape route from Vietnam, but hoping to move on from China to some where better, like Hong Kong.

Some reports suggest China would be happy to let refugees leave if they could establish they have relatives elsewhere. Some appear to have enough money to survive outside China. "A couple of rich refugees stayed in our hotel," said one attendant at Nanning's old-world style International Travel Hotel.

Only a few small groups of soldiers, usually bearing pistols, march the streets of Nanning. Not a single anti-Vietnamese wallposter could be seen in three days of walking and driving about the city. There is no sign of the kind of anti Vietnamese violence that erupted in 1968, when the Vietnamese consulate here was attacked by Red Guards and some Vietnamese beaten up, ostensibly for their links to Moscow.

But the Chinese recognize the difficulties the refugee flow - which they blame on the Vietnamese - has subjected them to, and thus has brought them to partially seal off the border. They have heard of Vietnamese military maneuvers across the border, and perhaps of some of their own maneuvers. No one seems much worried about a war but to the Chinese way of thinking one can not always be sure when the Russians are involved.

Chinese asked about their troubles with Vietnam all say, almost without exception, "There is someone else behinds this," meaning the Soviet Union.

Some foreign analysts suggest - and the Chinese don't discount it - that the brief Soviet raid into China's northeastern Heilungkiang Province on May 9 was intended to warn Peking that it would have trouble in the north if it took any overt military action against Vietnam in the south.

At the time the Chinese had just begun to complain about Hanoi's harassment of overseas Chinese, and there had been reports of a bloody Sino-Vietnamese skirmish in Feburary. The Soviet explanation that its troops accidentally crossed an international river boundary in pursuit of a criminal convinced neither the Chinese nor many diplomatic obsevers.

Peking ordered the closing last month of the three Vietnamese consulates here, in Kunming and in Canton shortly after China withdrew all its technicians and aid from Vietnam in the continuing diplomatic war between the two nations.

The Vietnam Consulate in Nanning stands empty, a large two-story building of gray stone and green tile roof with columns lining its front doorway. It is surrounded by palm trees and a high, iron-grill fence. A single Chinese soldier, apparently unarmed, walks inside the grounds in the early morning.

The Chinese say the send-off for the consulate staff was cordial, with Peking representatives accompanying the Vietnamese to the train station.

In Canton, 300 miles away, the area around the closed Vietnamese consulate on Shamien Island - the old foreign concession once closed to all Chinese - seemed more tense. A few people refused to talk to me when I asked directions to the building. A soldier patrolled the corner of the street where the large building, the former residence of the British commissioner, stands. His bayonet was fixed on his rifle and he waved me back when I tried to walk right past the consulate.

The shelter work, originally ordered to protect northern Chinese cities from Soviet attack, has picked up in Canton also. "It was stopped for a while," said one longtime resident of Canton, the capital of Kwangtung Province, "but began again about 1976."

A large hill in Yuehsiu Park near the Tongfang Hotel, a favorite foreign stopover, is now honeycombed with tunnels, the Canton resident said.

"We have a shelter under our university," said a former Kwangsi University student in Nanning. "I once had to work on it for a week, but, no, it still doesn't have space enough for all the students." The southern Chinese do not claim, as do officials of most northern Chinese cities, that they can now house their entire urban populations at least temporarily underground.

In popular resorts like Kweilin north of here, the many hillside caves that have not been developed as tourist attractions are being stocked with supplies in case of attack, officials say.

Whatever offensive military preparations the Chinese have made here, they are as hidden from the eyes of foreign tourists and visiting journalists as they apparently are from the eyes of the still untrustworthy hordes of refugees.

The people here say they don't worry about any attack. The stronger they are, and the better protected, the less likely it is to come. But the possibility remains in many minds.

The Wen Wei Pao, a Hong Kong newspaper that reflects thinking in Peking, speculated recently on the prospects of war. It pointed out that Vietnam was relatively weak, but such weakness had not stopped the Cubans from military adventures in Africa with Soviet help.

"The possibility of (Vietnam's, launchin a partial invasion of China, relying on Soviet power, still exists," the newspaper said. "But China has preparations against this."