When the side winning grants a ceasefire, it expects to receive "valuable hostages" so that the other side will not violate the peace. So, I think if Hamas surrendered its top 100 leaders in exchange for Israel withdrawing to from the Palestinian occupied territories as well as releasing their hostages in exchange for the UN providing permanent security forces between the two Palestinian territories and Israel, we could have a "lasting" peace.
UN security forces would be responsible for destroying all tunnels between the countries and ensuring all civilian infrastructure did not house any military assets. All humanitarian aid would go through a UN logistics team to ensure the aide went to the women and children first.
Now here is the hard part, any time it is determined that Hamas violated the peace, five of its leaders held as hostages would be executed for failing to abide by the peace... and Hamas would be expected to replace them with new hostages.
This may sound brutal, but unless the Hamas leaders' lives are at risk, a ceasefire will simply offer Hamas the chance to regroup and attack again in the future. The price of breaking the peace must be so severe that Hamas refuses to do so. Up to now, the loss of "human shields" has not influenced Hamas thinking, but the loss of its leaders might.