Do you think that French would allow 30 million Algerians to vote, while giving them extreme autonomy - making them a separate country effectively. Because that’s the only way the french could even remotely keep the whole Algeria, and even then it’s a huge stretch.
There just is too much of a Democraphic imbalance, there is no way for them to integrate Algeria peacefully.
Now here is the possibility to keep it by force, in this case it would involve separating Algeria in two, as well as lots of population displacement, if the goal is to have as many “Europeans” as possible, they could try to push for immigration, the pieds noir after all were very often Spanish in origin, there are some millions Spanish, Portuguese, Italians who really wanted to leave their country during the 20th century and they would gladly move to Algeria, if you can go pre 1900 there is a lot of potential (Even further back, if you can find a way to increase French emigration, either through a demographic transition comparable to other European countries or by making the southern part of the county much poorer) - not impossible that it could reach several million, maybe 5 or more, by today with such PoD.
Another idea would be try to prevent Algerians from going to the cities around the early 20th century so that the coast would be European majority
But even in this case there would still be too many Arabs for he French, so expect a lot of restriction on voting.
One of the proposal that is often talked about here Is making an exclave around Oran, since the département (post 1955 one, the one before 1955 was much larger) had a slight French majority , although by the late 50s the trend was quickly inverting. Again it’s militarily possible but it would be such a money drain i’m Not sure it would be worth it, and it would also require to move away a few hundred thousands Arab, and I doubt many pied noirs from Algier or Constantine would leave their homes to go to Oran. Algier also had most of the industries on Algeria, IMO an Algier exclave is slightly more feasible practically but considering the city was the most important of Algeria feuding its history there would be even more terrorist attacks and animosity. In 1961 few Algerian would have accepted an Oran exclave, in 1954 this could have been a possibility, but an Alger exclave would never have been accepted.
The Base of mers el kebir had a 15 years lease, renewable, after the Evian accord, but the French decided to leave it after 5 years, it included the naval base (which was in a highly defensible bay near Oran) as well as the air base and communication infrastructure in the small coastal plain (bousfer and El Ançor), this could have effectively been kept indefinitely - being more or less Ceuta sized with a minimal pod.
As for other colonies. Gabon is by far the easier, not sure it would have been worth it for France but the oil wealth would certainly be better redistributed than irl, so then gabonais would at least have a decent quality of life, much better than their neighbour. Commoros is much trickier since Mayotte was the only really pro French island, there would be significant unrest in the rest of the archipelago, but a poor French commutes would still be incomparably better than the irl commores
Djibouti is.. hard, the Somali majority really didn’t want the French to stay, there was some attacks in the 70s, so either 1) the French build a new base in the northern, afar majority part of the country, but that would be expensive af, 2) they give huge concessions to the Somalis BeFORE they get too agressive (unrealistic) or 3) they crackdown hard on them an resettle actively Afars and French their, unrealistic for IRL France, less so for one that keeps part of Algeria. (Btw, the 1967 referendum was very biaised toward the Afars, more of them voted than Somali despite being a minority)
Would it be worth it? I don’t know, they already have a base irl in Djibouti, the only Change would be that it would deny the American, Japanese and Chinese a base there, but i’m Sure Eritrea would be happy to give them some land.